Skip to content

SSL_ERROR_BAD_CERT_DOMAIN: Firefox Equivalent of CN_INVALID

TL;DR:

SSL_ERROR_BAD_CERT_DOMAIN is a Firefox error, the equivalent of Chrome's ERR_CERT_COMMON_NAME_INVALID. The SSL certificate does not cover the current domain. Fix: reissue the certificate with the correct Subject Alternative Name, or use a wildcard.

This error is a frequent issue in SSL debugging. We cover the causes and step-by-step fix.

Check your site's SSL →

What SSL_ERROR_BAD_CERT_DOMAIN means

SSL_ERROR_BAD_CERT_DOMAIN is a Firefox error, the equivalent of Chrome's ERR_CERT_COMMON_NAME_INVALID. The SSL certificate does not cover the current domain. Fix: reissue the certificate with the correct Subject Alternative Name, or use a wildcard.

The error can appear in Chrome, Edge, Opera, Brave (all Chromium-based), and partially in Firefox and Safari. Different browsers display the same code differently, but the underlying issue is the same.

How to fix (step-by-step)

  1. Check the SSL certificate online — the Enterno.io checker shows the grade, expiry, chain, and specific cause.
  2. If the issue is server-side — reissue the certificate via certbot or your chosen CA.
  3. Update nginx/apache config (enable TLS 1.2/1.3, fullchain, correct ciphers).
  4. Check kernel OpenSSL — an outdated openssl < 1.1 can break handshakes.
  5. After deploy: recheck via SSL checker + clear the browser SSL cache.

Check SSL now →

Related SSL errors

TL;DR

The SSL_ERROR_BAD_CERT_DOMAIN error occurs when the domain name in the SSL certificate does not match the domain of the website being accessed. To fix this, ensure that the SSL certificate is correctly configured for the intended domain. This can involve obtaining a new certificate that matches the domain name or updating the server configuration to use the correct certificate.

Understanding SSL_ERROR_BAD_CERT_DOMAIN

The SSL_ERROR_BAD_CERT_DOMAIN error is a critical issue that arises when there is a mismatch between the domain name in the SSL certificate and the actual domain being accessed by users. This error can prevent users from establishing a secure connection to your site, leading to potential loss of traffic and trust. Understanding the underlying causes and configuration settings is essential for resolving this issue.

When a browser encounters this error, it typically indicates that the certificate was issued for a different domain than the one being accessed. For instance, if a certificate is issued for www.example.com but the user attempts to access example.com, the browser will throw an SSL_ERROR_BAD_CERT_DOMAIN error.

To illustrate, consider the following scenario:

  • A website example.com has an SSL certificate issued for www.example.com.
  • A user attempts to visit example.com without the 'www' prefix.
  • The browser checks the certificate and finds that it does not match the requested domain, resulting in the SSL_ERROR_BAD_CERT_DOMAIN error.

To avoid such situations, it is crucial to ensure that your SSL certificate covers all necessary domain variations. This may involve using a wildcard certificate or obtaining a certificate that explicitly includes both variations.

Resolving SSL_ERROR_BAD_CERT_DOMAIN

To resolve the SSL_ERROR_BAD_CERT_DOMAIN error, follow these steps:

  1. Verify the Certificate: Use an SSL checker tool to inspect your SSL certificate. This tool will show you the domains for which the certificate is valid. You can use tools like SSL Shopper or Why No Padlock.
  2. Update the Certificate: If the certificate does not cover the domain being accessed, you will need to obtain a new certificate that includes the correct domain name. You can achieve this by:
    • Contacting your SSL certificate provider to reissue the certificate.
    • Using a Certificate Authority (CA) like Let's Encrypt to issue a free certificate for the desired domain.
  3. Configure the Web Server: Ensure that your web server is configured to serve the correct certificate. Here’s how you can do it for Apache and Nginx:
    • Apache: Edit your site’s configuration file (e.g., /etc/httpd/conf.d/your-site.conf) and ensure the following lines are correct:
    • SSLCertificateFile /path/to/cert.pem
      SSLCertificateKeyFile /path/to/key.pem
      SSLCertificateChainFile /path/to/chain.pem
    • Nginx: Edit your site’s configuration file (e.g., /etc/nginx/sites-available/your-site) and check the following lines:
    • ssl_certificate /path/to/cert.pem;
      ssl_certificate_key /path/to/key.pem;
  4. Test the Configuration: After making changes, restart your web server and test the configuration. For Apache, use:
  5. sudo systemctl restart apache2
  6. For Nginx, use:
  7. sudo systemctl restart nginx
  8. Clear Browser Cache: Sometimes the browser cache may retain old certificate information. Clear your browser cache or try accessing the site in incognito mode.

By following these steps, you should be able to resolve the SSL_ERROR_BAD_CERT_DOMAIN error and restore secure access to your website.

CertificateExpiry, issuer, domains (SAN)
ChainIntermediate and root CA validation
TLS ProtocolTLS version and cipher suite
VulnerabilitiesHeartbleed, POODLE, weak ciphers

Why teams trust us

TLS 1.3
supported
Full
CA chain check
<2s
result
30/14/7
days-to-expiry alerts

How it works

1

Enter domain

2

TLS chain verified

3

Expiry date & vulnerabilities

What Does the SSL Check Cover?

SSL/TLS is the encryption protocol that protects data between the browser and server. Our tool analyzes the certificate, chain of trust, TLS version, and knownvulnerabilities.

Certificate Details

Issuer, validity period, signature algorithm, covered domains (SAN), and validation type (DV/OV/EV).

Chain of Trust

Full chain verification: from leaf certificate through intermediates to root CA.

TLS Analysis

Protocol version (TLS 1.2/1.3), cipher suites, Perfect Forward Secrecy (PFS) support.

Expiry Alerts

Set up a monitor — get Telegram and email alerts 30/14/7 days before expiration.

DV vs OV vs EV Certificates

DV (Domain Validation)
  • Confirms domain ownership only
  • Issued in minutes automatically
  • Free via Let's Encrypt
  • Suitable for most websites
  • Most common certificate type
OV / EV
  • Organization (OV) or Extended Validation (EV)
  • Issued in 1-5 business days
  • Costs $50 to $500/year
  • For finance, e-commerce, government sites
  • Increases user trust

Who uses this

DevOps

SSL certificate monitoring

Security

TLS config audit

SEO

HTTPS as ranking factor

E-commerce

customer trust

Common Mistakes

Expired certificateBrowsers block sites with expired SSL. Set up auto-renewal or monitoring.
Incomplete certificate chainWithout intermediate CA, some browsers and bots cannot verify the certificate.
Mixed content on HTTPS siteHTTP resources on an HTTPS page — the browser lock icon disappears, reducing trust.
Using TLS 1.0/1.1Legacy TLS versions have known vulnerabilities. Use TLS 1.2+ or 1.3.
Domain mismatch in certificateThe certificate must cover all site domains, including www and subdomains.

Best Practices

Set up auto-renewalLet's Encrypt + certbot with cron — certificate renews automatically every 60-90 days.
Enable HSTSStrict-Transport-Security header forces browsers to always use HTTPS.
Use TLS 1.3TLS 1.3 is faster (1-RTT handshake) and safer — legacy ciphers removed.
Monitor expiration datesCreate a monitor on Enterno.io — get notified well before expiration.
Verify chain after renewalAfter certificate renewal, confirm that intermediate certificates are installed.

Get more with a free account

SSL certificate monitoring, check history and alerts 30 days before expiry.

Sign up free

Learn more

Sources

Frequently Asked Questions

Is it safe to ignore SSL_ERROR_BAD_CERT_DOMAIN?

No. This error indicates a real SSL certificate problem. Ignoring it (via chrome://flags or "thisisunsafe") makes the connection vulnerable to man-in-the-middle attacks. Fix it on the server side.

How can I catch this error early?

Use the <a href="/en/ssl">Enterno.io SSL/TLS checker</a>, or <a href="/en/monitors">set up monitoring</a> with 14-day expiry alerts. Receive an email/Telegram notification before your users see the error.

Does clearing cookies / cache help?

Sometimes, for transient cached SSL errors. Steps: chrome://net-internals/#sockets → Flush sockets, chrome://net-internals/#hsts → Delete domain security policies (carefully, for debugging only). But if the issue is server-side, cache clearing will not help.

Is Let's Encrypt free — and is the certificate trusted?

Yes, Let's Encrypt certificates are in every modern trust store (Chrome, Firefox, Safari, Edge). 90-day validity with automatic renewal via certbot. No reason to use a paid CA for a standard website.

Try the live tool that powered this guide

Free plan — 10 monitors, checks every 5 min, no card required. Upgrade for 1-minute interval and multi-region monitoring.