TOPIC: KEY MANAGEMENT
Adding a new domain or subdomain to an SSL certificate using Certbot
11th June 2025On checking the Site Health page of a WordPress blog, I saw errors that pointed to a problem with its SSL set up. The www
subdomain was not included in the site's certificate and was causing PHP errors as a result, though they had no major effect on what visitors saw. Still, it was best to get rid of them, so I needed to update the certificate as needed. Execution of a command like the following did the job:
sudo certbot --expand -d existing.com -d www.example.com
Using a Let's Encrypt certificate meant that I could use the certbot
command, since that already was installed on the server. The --expand and -d switches ensured that the listed domains were added to the certificate to sort out the observed problem. In the above, a dummy domain name is used, but this was replaced by the real one to produce the desired effect and make things as they should have been.