NET::ERR_CERT_COMMON_NAME_INVALID: the certificate is for another name

The certificate does not include this host name.

Certificate, chain, expiry and TLS versions.

What the error means

NET::ERR_CERT_COMMON_NAME_INVALID means the certificate is valid and trusted, but not for the address you typed. A certificate lists the names it covers (Subject Alternative Names); the host name in the address bar is not among them. Firefox shows SSL_ERROR_BAD_CERT_DOMAIN.

The usual causes

  • www or no www: the certificate covers example.com but not www.example.com, or the other way round.
  • A subdomain not included: shop.example.com on a certificate for the main domain only. A wildcard *.example.com covers one level (shop.example.com), not a.b.example.com and not the bare domain.
  • The wrong site on a shared server: the server sends its default certificate because the site has no certificate of its own, or SNI is not configured.
  • DNS points to the wrong server, for example an old hosting after a move.

How to fix it

  1. Check the exact address with the SSL checker above: it lists the names in the certificate and says whether this one is covered.
  2. Issue a certificate that includes every name you use (both example.com and www.example.com), or a wildcard.
  3. If the certificate belongs to another site, configure the certificate for this virtual host, or point DNS to the right server (check it in the DNS lookup).
  4. Redirect the variant you do not use to the one you do, with a valid certificate on both (the redirect checker shows the chain).

Related errors

Last updated: