LetsEncrypt: How to add an additional domain to an existing certificate with different working folders

Here’s the command:

/usr/local/bin/certbot-auto certonly –agree-tos –webroot -w /www/html/domain1.com -d domain1.com -w /www/html/domain2.com -d domain2.com -w /www/html/domain3.com -d domain3.com


Now let’s dissect it 🙂


This first part is OS specific, please update the path


and the command file may be different, mine was “-auto” yours may be just “certbot”



Second part, we only want the cert, so we just ask for it 😀




This one is pretty explainatory, but it does AUTOmatically agree to the TOS for you


–webroot -w /www/html/domain1.com

This is the primary cert’s web root folder


-w /www/html/domain2.com -d domain2.com

This is how you can add “x” amount of secondary domains to your cert


Here’a working example with 5 domains:

/usr/local/bin/certbot-auto certonly –agree-tos –webroot -w /www/html/domain1.com -d domain1.com -w /www/html/domain2.com -d domain2.com -w /www/html/domain3.com -d domain3.com -w /www/html/domain4.com -d domain4.com -w /www/html/domain5.com -d domain5.com


I hope this helps someone out there. It saved my bacon today x-)

Was this blog post helpful for you?

Support my blog and donate!

My blog is open to the public and will always be freely available. With your donation, we can help others learn, together.

Donate in Bitcoin: