Certificates

SSL_ERROR_BAD_CERT_DOMAIN: the domain name does not match the certificate

In short. Firefox found a certificate on your site, but it was issued for other names than the address your visitor typed. A typical case is a certificate for the bare domain used on the www address, or the reverse. The fix is to get a certificate that lists every address you use, or to send visitors to the right one.

SSL_ERROR_BAD_CERT_DOMAIN means, in Firefox's words: "requested domain name does not match the server's certificate." Firefox says it does not trust the site because it uses a certificate that is not valid for the host name, and when it can, it lists the names the certificate is valid for.

Last verified: November 26, 2026, against the Chromium and Firefox source code.

Read the names Firefox shows

Click Advanced. Firefox says the certificate is only valid for a name, or for a list of names. Compare with the address in your bar: with or without www, the right subdomain, no typo.

How to fix it

  1. Make a list of every address you serve: the bare domain, www, and each subdomain.
  2. Reissue the certificate so that it covers all of them. Either list each name, or use a wildcard certificate. A wildcard such as *.example.com covers one level of subdomain, and does not cover the bare example.com itself: add that name too (RFC 6125, section 6.4.3).
  3. Check which certificate each address gets. On a server hosting several sites, the wrong site's certificate may be served by default. Check the virtual host or the host's SSL settings for that name.
  4. Redirect the addresses you do not want to serve to the correct one, but only after they present a valid certificate themselves: a redirect cannot happen before the secure connection is established.
  5. Test with our free SSL certificate check, on each address.

Free tool. SSL certificate check

Never be caught out by an expiry again. AttackScout monitoring checks your certificate every day and warns you 30, 14, 7 and 1 day before it expires. Check my domain

Frequently asked questions

The error shows only on www. Why?

The certificate probably covers the bare domain but not www, or the reverse. Add the missing name when you reissue it.

Can I just add an exception in Firefox?

Firefox allows it for a visitor, but that does not fix your site, and your visitors will keep seeing the warning.

Sources

Accessed on 11/26/2026.