Firefox: Websites prove their identity via certificates — the certificate is only valid for other names. Error code: SSL_ERROR_BAD_CERT_DOMAIN
The certificate does not include the hostname you typed.
Websites prove their identity via certificates. Firefox does not trust this site because it uses a certificate that is not valid forThe certificate is only valid for the following namesError code: SSL_ERROR_BAD_CERT_DOMAIN Meaning
Compare the name in the address bar with the certificate's SAN list. A cert for example.com doesn't cover www.example.com unless it lists it. Typical on shared hosting default certificates, new subdomains without a certificate, or when DNS points to the wrong server.
Common causes
- Subdomain not included in the certificate
- DNS pointing to a different server with another certificate
- Default virtual host serving the wrong cert (SNI missing)
- Wildcard used at the wrong level
- Domain changed but certificate not reissued
⚡ Quick fix
- Reissue the certificate with all required names (SANs)
- Verify DNS points to the intended server
- Configure a matching
server_name/ServerName
Detailed fix by platform
Linux
openssl s_client -connect host:443 -servername host </dev/null 2>/dev/null | openssl x509 -noout -ext subjectAltName
How to diagnose
- SAN — Contains the host?
- DNS — Correct server?
- SNI — Correct vhost?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- AH01909: server certificate does NOT include an ID which matches the server name Apache: [ssl:warn] AH01909: example.com:443:0 server certificate does NOT include an ID which matches the server name
- Could not establish trust relationship for the SSL/TLS secure channel .NET: System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel
- NET::ERR_CERT_COMMON_NAME_INVALID NET::ERR_CERT_COMMON_NAME_INVALID: Your connection is not private (certificate is for a different domain)
Most viewed in SSL / TLS
- Challenge failed for domain Let’s Encrypt / Certbot: Challenge failed for domain example.com — Invalid response from http://example.com/.well-known/acme-challenge/x: 404
- no start line OpenSSL: unable to load certificate / PEM routines:get_name:no start line (key values mismatch)
- Certificate pinning failure! Android/OkHttp: javax.net.ssl.SSLPeerUnverifiedException: Certificate pinning failure! Peer certificate chain: sha256/... Pinned certificates for api.example.com
Other ways to find it
Where this error sits
Origin: Network. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 4 Nov 2026