Combining multiple domains

I am trying to proxy around 600 domains so I need to combine them in blocks of SSL certificates.

If you have a lot of subdomains, you may want to combine them into a single certificate, up to a limit of 100 Names per Certificate.

As clearly stated in here

and in my tests caddy fetches a certificate for every domain.

Is there any way to use aggregate multiple domains in the same certificate?

If it is needed, at our shop we are programmers and know golang so if we got any hint on where to expand this feature we could do it ourselves.

Caddy does not manage SAN certificates, but there are tools to help you do this: GitHub - go-acme/lego: Let's Encrypt client and ACME library written in Go can put 100 names on a certificate for you. Then you can give Caddy those certs with tls directive, see the load subdirective.

UPDATE: (Since a lot of people are apparently finding this post…) Caddy does not have any need for SAN certificates. You will not hit Let’s Encrypt rate limits unless they are all subdomains; and if that is the case, you can have Caddy manage a single wildcard certificate instead.

1 Like

Great, thank you. I looked into caddy’s code and saw lego as a dependency so I can expand from there.