Additional sub-domain

Hi all,

I have set up a new sub-domain on my website and want to add an new certificate for it.

My existing certs will expire in a month or so and I was going to wait until then so that everything will be in sync.

My question is can I just add the new sub-domain to the list of sites that the renewed certificates will be valid for?

Existing valid certs for:-
example.com
www.example.com
sub1.example.com

new site
sub2.example .com

thought I might do something like:-
./letsencrypt-auto certonly -d example.com -d www.example.com -d sub1.example.com -d sub2.example.com

Steve

That's pretty much it, with the addition of --expand. That'll replace your existing certificate and key files, instead of creating a new directory in /etc/letsencrypt/live/.

--expand              If an existing cert covers some subset of the
                      requested names, always expand and replace it with the
                      additional names. (default: False)

It'll also amend your renewal config file, so the next time you run ./letsencrypt-auto renew, the new domain will be added as well. Let's Encrypt recommends to renew every 60 days, so your timing is just right. :smile:

1 Like