This post tells you how to add a new domain to an existing certificate with Certbot.
Description
I have generated a certificate with Certbot and bound the domain a.com to it. Now I want to add the new domain b.com to this existing certificate.
Solution
Check the Certificate
First of all, check the certificate name with the following command.
1 | certbot certificates |
The information of the certificate will appear like this.
1 | [root@localhost ~]# certbot certificates |
Note the certificate name a.com
.
1 | Certificate Name: a.com |
Modify the Certificate
Use this command to modify the certificate. Note that -d
must contain all domains including the existed a.com
and the new b.com
.
1 | certbot certonly --cert-name a.com -d a.com,b.com |
This operation will take the port 80
.
Follow the hints to finish adding the new domain b.com
.