Add subdomains to Let’s Encrypt Certbot

If you already have a certificate issued from Let’s Encrypt for your current site, but added a new subdomain and want it to also use ssl, here is the command to do so.

Example:
current cert for -> example.com, www.example.com
new subdomain [no cert] -> dev.example.com

To add ssl with certbot to dev.example.com, run the following command.

certbot -d example.com,www.example.com,dev.example.com --expand

*Note that there are no spaces between the domain names and commas.