Categories
How To

letsencrypt – several domains in one certificate

Errors Seen

The errors found during this can be several, depending on setup. Going to the www.domain.com while you only have a certificate with domain.com, will make your browser complain about issues with the certificate.

Same with the other way around.

Why

The certificate needs to contain both the domains used in the VirtualHost in Apache or Server Block in nginx.

Solution

Run letsencrypt with

letsencrypt -d domain.com -d www.domain.com

Note that the above command will attempt to automatically add certificate to whichever webserver you are using. Use letsencrypt --help for further help.

Leave a Reply

Your email address will not be published. Required fields are marked *