Search code examples
apachesslbitnamilets-encrypt

How can I generate a LetsEncrypt Cert for multiple domain variants?


I'm following this guide to try and install a security certificate on my server: https://docs.bitnami.com/aws/how-to/generate-install-lets-encrypt-ssl/

I want to cover different domain name variants (.com, .co.uk www etc), so am wondering if in this line:

sudo lego --email="EMAIL-ADDRESS" --domains="DOMAIN" --path="/etc/lego" run

I'll be able to use a comma delimited list of domains?

And when I do , will this create a .crt & .key file in /etc/lego/certificates with a really long name? How will it generate the name?


Solution

  • The first domain name that you specify with --domains will be the one granted a certificate and the name used. The extra domain names specified with additional --domains will be part of the SAN (Subject Alternative Names).

    SAN allows for multiple domain names to exist in one certificate.