troubleshooting 2026-12-02 ⏱ 3 min read

Fix SSL_ERROR_BAD_CERT_DOMAIN in Firefox

Fix SSL_ERROR_BAD_CERT_DOMAIN in Firefox
Quick Answer: Firefox shows SSL_ERROR_BAD_CERT_DOMAIN when the site name is missing from the certificate. Reissue the certificate with all hostnames and install it on the matching server block.

Fix SSL_ERROR_BAD_CERT_DOMAIN: what Firefox means

The certificate is valid and trusted, but it was issued for other names than the one in the address bar. This is the Firefox wording of the same problem Chrome reports as a common name error. Click Advanced on the warning page to see which names the certificate does cover.

Quick checks

CheckHow
Which names are on the certificateUse the Live SSL Checker or Firefox's View Certificate page
Does DNS point to the right serverUse the DNS Lookup Tool
Is www coveredTest both example.com and www.example.com
Is the right server block answeringRequest with openssl and the SNI name
echo | openssl s_client -servername www.example.com -connect example.com:443 2>/dev/null \
  | openssl x509 -noout -subject -ext subjectAltName

Fix SSL_ERROR_BAD_CERT_DOMAIN: fixes by cause

CauseFix
Hostname not on certificateReissue with every hostname
Shared hosting default certificateInstall an SSL for your domain in the panel
New subdomain added laterAdd it to the certificate or use a wildcard
Old DNS record pointing to another hostUpdate the record to your server
CDN edge not set up for the hostnameAdd the domain in the CDN and wait for its certificate
Wrong certificate installed on the virtual hostPoint the SSL directives to the correct files

Apache example

<VirtualHost *:443>
    ServerName example.com
    ServerAlias www.example.com
    SSLEngine on
    SSLCertificateFile    /etc/ssl/example/certificate.crt
    SSLCertificateKeyFile /etc/ssl/example/private.key
    SSLCertificateChainFile /etc/ssl/example/ca_bundle.crt
</VirtualHost>

If several sites share one IP, each needs its own VirtualHost with a matching ServerName so SNI selects the right certificate.

Get the new certificate

Issue a free certificate for all names at TryFreeSSL, install it, reload the server and re-run the checker. If you serve a language or country domain too, include it. Finally enforce one canonical address with a redirect from the HTTPS Redirect Generator.

Related reading: the common name mismatch error and the wider mismatch fix.

Frequently Asked Questions

Is SSL_ERROR_BAD_CERT_DOMAIN the same as ERR_CERT_COMMON_NAME_INVALID?

They describe the same kind of name mismatch in different browsers.

Should I click Accept the Risk?

Not on sites you do not control. On your own site, fix the certificate instead.

Why does it affect only some pages?

Different hostnames or subdomains may be served by different servers or certificates.

Can a wildcard certificate cause it?

Yes, if the host is two levels deep or the bare domain is not listed separately.

Is the certificate itself broken?

No. The chain and the dates can be perfectly valid. The error says the name in the address bar is not one of the names on the certificate, which is a coverage problem rather than a trust problem.

Do I need a new certificate for www?

If www is not on the certificate, yes, or a reissue that adds it. Many CAs will issue one certificate listing both the apex and www, which is the simplest fix. A wildcard certificate covers www as well if you already hold one.

Why does it fail only in Firefox?

Firefox may be connecting to a different address than the browser you tested with, or the server may send a different certificate depending on the name requested. Test the exact hostname with an SNI check.

Can I add a hostname without a new certificate?

Only by reissuing. A certificate's names are fixed when it is signed, so a name you add later needs a new certificate or a reissue that lists it, which most CAs allow during the same validity period.

🔒 Test Your Website SSL Certificate Now
Run Free SSL Check →

✅ Post-Installation Verification & SEO Checklist

After applying the steps above, run through this 5-point checklist to prevent browser warnings and protect your Google SEO rankings:

  • Verify full CA chain trust and TLS 1.3 support using our Live SSL Checker.
  • Scan for Mixed Content HTTP links and check HSTS/CSP headers on Security Headers Checker.
  • Enforce a permanent 301 HTTP-to-HTTPS redirect with our HTTPS Redirect Generator.
  • Confirm both root and www versions resolve cleanly to one canonical HTTPS URL.
  • Verify your HTTPS property and sitemap.xml inside Google Search Console and Bing Webmaster Tools.
Technically Reviewed by TryFreeSSL Security Team
Last updated: 2026-12-05
About Us →

Free SSL Certificates, Live SSL Checker & CSR Generator

Issue trusted Let's Encrypt SSL certificates in 60 seconds with zero server setup.

Related Articles

🤖 TryFreeSSL AI Assistant