install on Debian 12 with nginx
sudo apt update
sudo apt upgrade
sudo apt install certbot python3-certbot-nginx
expand domans of a certificate
Add new domains to an existing certificate
method1
# shrink extra domains
certbot certonly --cert-name example.com -d example.com
# expand domains
certbot certonly --cert-name example.com -d example.org,www.example.org
method2
Consider using --cert-name instead of --expand, as it gives more control over which certificate is modified and it lets you remove domains as well as adding them.
certbot --expand -d existing.com,example.com,newdomain.com
# or
certbot --expand -d existing.com -d example.com -d newdomain.com
install multi-domain certifiacete
certbot certonly -d example.com -d www.example.com