# What does 'NET::ERR_CERT_COMMON_NAME_INVALID' mean?

**Short answer:** The server presented a valid certificate, but not for this hostname. A common case is `www.example.com` serving a cert issued only for `example.com`, or a host's default cert because the domain isn't attached to your project. Add the exact hostname (apex and www) to your hosting project so the certificate covers it.

*Last updated 2026-11-25 · Reviewed by ProofForge*

## The exact error

```text
Your connection is not private
Attackers might be trying to steal your information from www.example.com.
NET::ERR_CERT_COMMON_NAME_INVALID
```

## Why it happens

- Only the apex domain is added to the host, but DNS for `www` points there too.
- DNS points to a platform that serves its own default certificate for unknown domains.
- Old A records point at a previous server.

## How to fix it

1. Add both `example.com` and `www.example.com` to the hosting project, and redirect one to the other.
2. Remove stale A/AAAA/CNAME records so only the current host answers.
3. Wait for the new certificate, then retest.

```bash
# which names does the served certificate cover?
openssl s_client -connect www.example.com:443 -servername www.example.com </dev/null 2>/dev/null \
  | openssl x509 -noout -ext subjectAltName
```

## Check it's fixed

The certificate's Subject Alternative Name list includes the exact hostname, and the browser shows no warning.

> **Scan box (use the site's ScanBox component):** Check whether your live app has this problem. Paste your URL for a free outside-in scan covering exposed keys, open database rules, CORS and security headers. [Scan my app free →](https://proofforge.live/#scan)

## FAQ

### Can visitors click through?
They can, but most won't, and it trains users to ignore real attacks. Fix the certificate.

### Does it hurt SEO?
Yes. Crawlers and users can't load the page securely on that hostname.

### Common name or SAN?
Browsers check the Subject Alternative Name list. The error name is historical.

## Sources

- [Google Chrome Help: Fix connection errors](https://support.google.com/chrome/answer/6098869)
- [Netlify: HTTPS (SSL)](https://docs.netlify.com/manage/domains/secure-domains-with-https/https-ssl/)
- [Vercel: Troubleshooting domains](https://vercel.com/docs/domains/troubleshooting)

## Related

- [Fix ERR_SSL_PROTOCOL_ERROR on your custom domain](/errors/err-ssl-protocol-error)
- [Fix: missing HTTPS redirect](/fix/missing-https-redirect)
- [Security headers checker](/tools/security-headers-checker)
- [All errors](/errors)
