Add new subdomains

My domain is: storetech.top

I ran this command: certbot certonly -a webroot --webroot-path=/web/user/zoo100.ru/www -d storetech.top -d www.storetech.top

It produced this output: I received a certificate for the domain and for the subdomain www

I can login to a root shell on my machine (yes or no, or I don't know): Yes

I'm using a control panel to manage my site (no, or provide the name and version of the control panel): No

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): 0.28.0

The certificate works, but I need to add a few more subdomains. Please tell me how to do it. What command? Thanks

1 Like

Unfortunately, certbot currently does not have an easy way to modify (i.e., add/remove) hostnames from an existing certificate. You'll need to "re-issue" the already existing certificate with the same command you've used previously, but now with the modified list of hostnames using -d. I.e., to add a third hostname, you'd use the existing two -d options and add a third -d option. And if you'd want to remove one of the hostnames, you'd use one -d option less.

To prevent certbot from adding separate certificates (so you'd end up with your old, unused certificate and the new one), I recommend to add the option --cert-name followed by the certificate name you can find when running the command certbot certificates.

Also, your certbot is very old.. I recommend updating to a more recent version.

2 Likes

Thanks for the comprehensive guide, I'll try ...

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.