Skip to content
ecdsa.com
Chrome, Edge and other Chromium browsersBrowsers

Error message

net::ERR_CERT_COMMON_NAME_INVALID

The interstitial shows "NET::ERR_CERT_COMMON_NAME_INVALID"; automation tools print "net::ERR_CERT_COMMON_NAME_INVALID".

Chrome, Edge and other Chromium browsers — the certificate does not cover the host name in the address bar

What it means

The certificate is trusted and in date, but the host name in the address bar is not among its Subject Alternative Names. Despite the name, Chrome does not use the Common Name at all (since Chrome 58); the certificate must list the host in subjectAltName. Typical: www vs. bare domain, a new subdomain, or a wildcard used one level too deep.

Why it happens

How to fix it

  1. 1.

    Compare the SAN list with the address

    The missing name is the one to add.

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

    Reissue with every name you serve

    Include apex, www and all subdomains (or a wildcard per level).

    bash
    # Cover the apex and www (and any subdomain you serve)
    sudo certbot certonly --nginx -d example.com -d www.example.com
  3. 3.

    Check which certificate each name gets

    On shared servers, a name without its own server block receives the default certificate of another site.

    text
    # nginx: every served name needs a server block with a matching certificate
    server {
        listen 443 ssl;
        server_name example.com www.example.com;
        ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
    }

Related errors

Browse the full signature error database