Black Friday: 60% off yearly plans with code BF2026, until November 30. See the deal

Troubleshooting

NET::ERR_CERT_COMMON_NAME_INVALID: causes and fixes

NET::ERR_CERT_COMMON_NAME_INVALID means the certificate the server presented was not issued for the hostname in the address bar. The certificate itself may be valid, but its Subject Alternative Names do not include the name you used, so you must reissue it with that name or serve the right certificate.

The short answer
  • Match is against the certificate's Subject Alternative Names. RFC 9525 says the Common Name must not be used.
  • Typical triggers: apex vs www, a subdomain a wildcard does not cover, or the wrong site serving the cert.
  • Fix by reissuing the certificate with every required name, or by correcting which certificate the server presents.
Try the ssl certificate checkerFree, live, no signup

Which names does a certificate actually cover?

Matching examples under RFC 9525 wildcard rules
Certificate listsVisited nameMatch?
example.comwww.example.comNo
www.example.comexample.comNo
*.example.comshop.example.comYes
*.example.comexample.comNo
*.example.coma.shop.example.comNo
example.com and www.example.comeither nameYes

A wildcard must be the whole left-most label and matches exactly one label (RFC 9525, section 6.3). The wildcard rows follow that rule.

How do you find the cause?

  1. 01

    Read the names in the certificate

    Open the certificate details in the browser or use openssl to print the Subject Alternative Name list.

  2. 02

    Compare with the URL you typed

    Apex versus www and deeper subdomains are the usual gaps.

  3. 03

    Test with the right SNI name

    Run openssl s_client with -servername set to the hostname. If the certificate changes, the server picks certificates by name and your virtual host is missing or misconfigured.

  4. 04

    Check where the domain points

    If DNS sends the name to a different server or a shared host default site, that server presents its own certificate.

  5. 05

    Reissue with all names

    DigiCert advises generating a new CSR that includes the missing domain and reissuing the certificate.

How do you print the certificate names?

OpenSSL
echo | openssl s_client -connect example.com:443 -servername example.com 2>/dev/null \
  | openssl x509 -noout -subject -ext subjectAltName

What causes a hostname mismatch in real setups?

Domain points to the wrong host

A CNAME or A record sends traffic to a server that holds a certificate for a different site.

Default virtual host answers

The request did not match any configured server name, so the default site's certificate is returned.

CDN or hosting default certificate

A custom domain was added before its certificate was issued, so the platform shows its own name.

What should you verify after reissuing the certificate?

  • The Subject Alternative Name list contains the bare domain and www
  • Each subdomain in use, such as app, api and shop hosts, is listed or covered by a wildcard at the right level
  • The certificate is installed on the server that DNS actually points to
  • SNI-based virtual hosts each use their own certificate and key
  • Redirects from the old name to the new one also land on a valid certificate
  • The old certificate is removed from any server that still presents it for the wrong name

Common questions

What does ERR_CERT_COMMON_NAME_INVALID mean?

The certificate the server sent does not cover the hostname you visited. Chromium describes it as the common name not matching the host name. In practice browsers check the Subject Alternative Names, so the hostname must appear there.

Does the Common Name still matter?

RFC 9525 states that the Common Name must not be used to identify a service. Server identity is expressed in the subjectAltName extension, so a name only present as the Common Name will not match.

Does a wildcard certificate cover the bare domain?

No. A wildcard such as *.example.com matches exactly one label, so it covers shop.example.com but not example.com and not a.shop.example.com. Add the bare domain as a second name on the same certificate.

How do I fix it if I do not own the site?

You cannot. The owner must serve a certificate that includes the hostname. As a visitor, check that you typed the right address and try the www or non-www variant, then notify the site owner.

Does an IP address work as a certificate name?

Only if the certificate lists that IP address in its Subject Alternative Names as an IP entry. RFC 9525 defines IP-ID alongside DNS-ID as valid identifier types. Most public CAs do not issue such certificates by default, so use a hostname for public sites.

Watch your domains automatically

Aepto monitors expiry, DNS, SSL and uptime for every domain you own and alerts you when something changes. Free for 3 domains.