Site Monitors

ERR_CERT_COMMON_NAME_INVALID: the certificate doesn't match the domain

Updated November 16, 2026 · 6 min read

When a certificate doesn't cover the address a visitor typed, browsers stop the page and show a full-page warning. Chrome shows "Your connection is not private" with the code NET::ERR_CERT_COMMON_NAME_INVALID. Firefox shows "Warning: Potential Security Risk Ahead" with SSL_ERROR_BAD_CERT_DOMAIN. The certificate can be valid, unexpired and from a trusted authority. It is simply for a different name.

A certificate lists the exact hostnames it covers, in a field called Subject Alternative Names. The browser compares the address in the bar with that list, and if the address isn't on it, the visitor gets the warning. Chrome stopped using the older Common Name field in 2017 (version 58), so only that list counts, even though the error code still says "common name".

1. Find out which names the certificate covers

Enter the exact address that shows the warning into the free SSL checker. It tells you the certificate isn't issued for that name, and lists the names it does cover.

From a terminal, this prints the names the certificate covers. Use the address that shows the warning in both places:

echo | openssl s_client -connect www.example.com:443 -servername www.example.com 2>/dev/null | openssl x509 -noout -text | grep -A1 "Alternative Name"

Look for the exact address you tested. example.com and www.example.com are different names, and a certificate has to list each one.

2. The usual causes

3. Fix the cause

A name is missing. Reissue the certificate with every name on it. With Certbot, repeat the command you used originally, list each name with -d, and add --expand. For example:

sudo certbot --expand -d example.com -d www.example.com

Then reload the web server, for example sudo systemctl reload nginx. On managed hosting or a control panel, add the missing domain or subdomain in the SSL section and run the certificate issue again (often called AutoSSL). For a certificate you bought, ask the provider to reissue it with the extra name.

The wildcard doesn't reach. Put both example.com and *.example.com on the same certificate. Name any deeper subdomain separately, or use a certificate that covers it.

The server shows the wrong certificate. Make sure the site has its own server block or virtual host for that name, with its own certificate, and that the name is in its server_name line (nginx) or ServerName line (Apache). Then reload the web server.

DNS points elsewhere. See where the name points, and change the record if it's wrong. Wait for the change to spread before testing again.

dig +short www.example.com

4. Check the fix worked

Run the address through the SSL checker again and look for the name in the list it covers. Then open each version of the address in a private browsing window: with and without www, and any subdomains. A normal window can keep using the old connection for a while.

After moving a site to new hosting

This warning is common right after a move. The old certificate belonged to the old server, and the new one hasn't been issued for every name yet. Many hosts can only issue a certificate once DNS points at them, so there can be a gap between the switch and the certificate. Check every address as soon as DNS changes, not the next day.

Catch it before visitors do

Site Monitors checks every hostname you add and flags a certificate that isn't issued for it, along with expiry and broken chains. Add the www and bare versions of each domain as separate sites. It's free for up to 5 sites. You can check any address right now with the free SSL checker.

Get alerted before it expires

Create a free account and we'll watch your certificates and domains for you, and email you before anything expires. Free for up to 5 sites.