Cannot get mulitple certs for a host with two domains


I’m trying to get certs via standalone for four domains. They’re for an install of Apache2 that hosts websites for both of the domains. I understand I need to have a cert for the base domain and the www.subdomain… When I run the command line below, I get ONLY the first cert (domain1.tld)… My understanding of the mechanism is you can do up to 100 domains at a time via the script… Help?

./letsencrypt-auto certonly --standalone --email -d domain1.tld -d www.domain1.tld -d domain2.tld -d www.domain2.tld --agree-tos

I’m doing standalone/cert only as the last time I tried to use the apache2 plugin to directly place the certs, it broke my install of apache and it took a while to fix… I’ve used the standalone certonly with other domains I maintain, but this is the first time I’ve tried to do multiple domains at one time…


Look at the extended information for the certificate. The subject will be for the first domain you put on the command, but all the domains, if validated, will be in the “X509v3 Subject Alternative Name” field.


My understanding so far is that the above command gets you one certificate, which is valid for all of the domains you specify ( What I used to get a different certificate for every domain I owned was a script that run the client many times - one for every domain.
./letsencrypt-auto certonly --standalone --email -d domain1.tld, www.domain1.tld --agree-tos
./letsencrypt-auto certonly --standalone --email -d domain2.tld, www.domain2.tld --agree-tos

That will give you two certificates.


Ahh… Got it… Thanks for the quick replies!!!