Domain Certificate Mismatch Causes: 2026 Fix Guide
By Nick Phillips, Founder

A domain certificate mismatch error is defined as the condition where the hostname in your browser’s address bar does not match any name listed in the SSL certificate’s Subject Alternative Name (SAN) field, causing the browser to block the connection entirely. The industry term for this is a “hostname mismatch” or “common name mismatch,” though browsers surface it as Chrome’s "NET::ERR_CERT_COMMON_NAME_INVALIDor Firefox'sSSL_ERROR_BAD_CERT_DOMAIN`. Understanding domain certificate mismatch causes is the difference between a five-minute fix and a two-hour debugging session. Tools like the DigiCert SSL checker and Otterwatch’s SSL checker can confirm exactly which hostnames your certificate actually covers before you start guessing.
1. What are the most common domain certificate mismatch causes?

The single most frequent trigger is the apex vs. www mismatch. A certificate issued for example.com does not automatically cover www.example.com, and vice versa. Both variants must appear explicitly in the SAN list, or half your visitors will hit a security warning depending on how they type your URL. This catches a surprising number of site owners off guard, especially after migrating to a new certificate authority.
Beyond apex vs. www, here are the other causes that show up most often:
- Missing SAN entries. A certificate can be perfectly valid and still cause mismatch errors if a specific subdomain (like
shop.example.comorapi.example.com) was never added to the SAN list at issuance time. - Wildcard certificate limitations. A wildcard like
*.example.comcoverswww.example.combut notstaging.shop.example.com. Multi-level subdomains require a separate SAN entry or a second wildcard. - SNI misconfiguration. When Server Name Indication is set up incorrectly, the server presents the wrong certificate for the requested hostname entirely.
- Self-signed certificates in production. Browsers reject self-signed certs outright, and the error looks identical to a mismatch to most users.
- Certificates issued before a domain alias was added. Adding a subdomain or marketing alias after issuance without reissuing the certificate leaves that new hostname uncovered.
- CN-only certificates. Chrome stopped trusting the Common Name field alone since version 58. If a hostname only appears in CN and not in SAN, modern browsers will reject it.
Pro Tip: Open your browser’s certificate viewer (click the padlock, then “Certificate”) and scroll to the SAN section. If the hostname you’re accessing isn’t listed there exactly, that’s your mismatch right there. No tools needed for a quick first check.
2. How SNI and virtual host configuration cause mismatches
Server Name Indication (SNI) is the TLS extension that tells a server which hostname the client is trying to reach during the handshake, before any HTTP traffic is exchanged. This matters because TLS certificate selection happens before HTTP routing, so the server must pick the right certificate based purely on the SNI value in the handshake. If SNI is missing or misconfigured, the server falls back to its default certificate, which may cover a completely different domain.
“Many admins assume the cert installed is being served, but if SNI is missing or server config falls back to defaults, mismatches occur.” This is one of the most common misdiagnoses in shared hosting and multi-tenant environments.
Here is the sequence that leads to this type of mismatch:
- A client connects to a shared IP hosting multiple domains.
- The client sends an SNI value (the hostname) in the TLS ClientHello message.
- The server matches that SNI value against its virtual host configuration.
- If no virtual host matches, the server sends the default certificate, which belongs to a different domain.
- The browser compares the certificate’s SAN list to the requested hostname and finds no match.
- The browser blocks the connection and displays a certificate validation error.
In NGINX, a common misconfiguration is forgetting ssl_certificate and ssl_certificate_key directives in a specific server block, causing all requests to that IP to receive the certificate from the first server block loaded. Apache has a similar behavior with VirtualHost ordering. To diagnose this from outside your network, run openssl s_client -connect yourdomain.com:443 -servername yourdomain.com and check which certificate is actually returned. If it’s not yours, the SNI routing is broken at the server or edge layer.
3. What role do wildcard and SAN certificates play?
Wildcard certificates and SAN certificates solve the same problem (covering multiple hostnames) but in fundamentally different ways, and confusing the two is a reliable path to mismatch errors. Here’s a direct comparison:
| Feature | Wildcard (*.example.com) |
SAN certificate |
|---|---|---|
| Coverage | One subdomain level only | Any specific domains listed |
| Multi-level subdomains | Not covered | Covered if explicitly listed |
| Multiple root domains | Not supported | Supported |
| Typical use case | Simple subdomain setups | Complex, multi-domain environments |
| Reissuance on new domain | Not needed for same level | Required for each new addition |
A wildcard certificate covers www.example.com, mail.example.com, and api.example.com without issue. It does not cover staging.shop.example.com because that name contains two dots before the root domain, and wildcards only match one DNS label. This trips up teams that spin up deeper subdomains for staging, internal tools, or microservices without thinking about certificate coverage.
SAN certificates list every covered hostname explicitly. They require reissuance whenever you add a new domain or subdomain, but they give you precise control. The best practice for complex environments is to combine both: use a wildcard entry in the SAN list alongside specific additional domains. You can read a detailed breakdown of when each approach makes sense in the wildcard vs SAN guide on the Otterwatch blog.
Pro Tip: When requesting a certificate, always include both example.com and *.example.com as SAN entries. This single habit eliminates the apex vs. www mismatch and gives you wildcard coverage for one-level subdomains in the same certificate.
4. How deployment errors and outdated certificates cause mismatch issues
Deployment errors are responsible for a significant share of mismatch complaints that aren’t actually caused by certificate scope problems. The certificate itself may be correctly issued, but it ends up on the wrong server, in the wrong virtual host, or covering the wrong domain name because of how it was deployed.
Common deployment-related causes include:
- Self-signed certificates pushed to production. This happens most often when a developer copies a local dev environment config to a live server. Browsers reject self-signed certs with the same visual warning as a hostname mismatch, so users can’t tell the difference.
- Legacy domain names in the certificate. A company rebrands, changes its domain, or acquires a new URL, but the existing certificate still lists the old domain. The new domain triggers an immediate mismatch error.
- Failure to reissue after adding aliases. Marketing teams add campaign subdomains or regional domains without looping in the team managing certificates. New domain aliases require reissuance of the certificate with the new names included.
- CAA DNS record misconfigurations. Incorrect CAA records block certificate issuance from certain certificate authorities, which can result in the server falling back to an older or default certificate that doesn’t match the current domain setup.
- Load balancer or proxy presenting the wrong cert. In environments with Cloudflare, AWS CloudFront, or an NGINX reverse proxy, the edge layer must also present the correct certificate. Fixing the origin server cert alone is not enough if the proxy is terminating TLS with a different certificate.
- Automation failures. Let’s Encrypt auto-renewal scripts that fail silently can leave an expired or mismatched certificate in place while the admin assumes everything is fine.
The SSL certificate installation guide on Otterwatch walks through the most common installation mistakes if you want to audit your own setup step by step.
5. Practical steps to diagnose and fix certificate mismatches
Fixing a mismatch starts with confirming exactly what the certificate says, not what you think it says. Work through these steps in order:
-
Check the SAN list in your browser. Click the padlock icon, open the certificate details, and find the “Subject Alternative Names” section. Confirm the exact hostname you’re accessing appears there. Remember that only SAN entries are validated by modern browsers; the CN field is irrelevant.
-
Test from outside your network using openssl. Run this command to see exactly what certificate your server is presenting to external clients:
openssl s_client -connect yourdomain.com:443 -servername yourdomain.comLook at the
subjectandsubjectAltNamefields in the output. -
Use an online SSL checker. The DigiCert SSL checker and Otterwatch’s free tool both show the full SAN list and flag hostname coverage gaps immediately. This is faster than reading raw openssl output.
-
Reissue the certificate with all required hostnames. If the SAN list is missing entries, you need a new certificate. Add every variant you use: apex domain, www, any subdomains, and any aliases. Do not reinstall the same certificate expecting a different result.
-
Fix SNI and virtual host configuration. After reissuing, confirm your NGINX or Apache config maps the correct certificate to the correct server block. Test again with openssl from an external machine.
-
Check your proxy and edge layer. If you use Cloudflare, a load balancer, or any reverse proxy, verify the certificate presented at the edge matches the one you just installed. The TLS handshake at the edge is what the browser actually sees.
-
Set up ongoing monitoring. A certificate that’s correct today can develop a mismatch tomorrow if someone adds a new subdomain or if an auto-renewal fails. Automated monitoring catches these changes before visitors do.
Pro Tip: Never click through a certificate warning on your own site to “check if it’s working.” That bypasses the exact security check you need to verify. Always test with openssl or an external SSL checker that reports the raw certificate data.
The table below summarizes the most common mismatch scenarios and their fixes:
| Mismatch scenario | Root cause | Fix |
|---|---|---|
www works, root domain doesn’t |
Apex domain missing from SAN | Reissue with both variants in SAN |
| Deep subdomain fails | Wildcard doesn’t cover two levels | Add explicit SAN entry for that subdomain |
| All domains fail on shared IP | SNI misconfiguration | Fix virtual host SSL directives |
| New subdomain fails | Certificate not reissued after addition | Reissue with new subdomain in SAN |
| Self-signed warning | Dev cert in production | Replace with CA-issued certificate |
Key takeaways
Domain certificate mismatches are caused by hostname coverage gaps in the SAN list, SNI misconfiguration, or deployment errors, and every case is fixed by identifying what the certificate actually covers versus what the browser requests.
| Point | Details |
|---|---|
| SAN list drives all validation | Modern browsers ignore CN; every hostname must appear explicitly in the SAN field. |
| Wildcards have hard limits | A *.example.com cert does not cover multi-level subdomains like staging.shop.example.com. |
| SNI config determines which cert is served | Wrong or missing SNI causes servers to present a default certificate to the wrong hostname. |
| Edge and proxy layers matter | Fixing the origin cert is not enough; the proxy or CDN must also present the correct certificate. |
| Monitoring prevents recurrence | New subdomains and domain changes require certificate updates; automated monitoring catches gaps early. |
What I’ve learned from chasing down mismatch errors
I’ve seen the wildcard limitation catch teams completely off guard more times than I can count. A development team spins up api.staging.example.com for a new microservice, the wildcard cert covers *.example.com, and everyone assumes it’s fine. It isn’t. That second dot before the root domain puts it outside the wildcard’s reach, and the first time a browser hits it, the security warning appears. The fix is a single SAN entry, but finding the cause takes an hour if you don’t know where to look.
The other thing that trips people up consistently is the assumption that checking the certificate on the origin server is sufficient. In environments with Cloudflare, AWS CloudFront, or any other proxy layer, the certificate the browser sees is the one at the edge, not the one on your origin. I’ve watched admins reinstall a perfectly correct certificate on their origin server three times while the edge was still serving the old one. Always test certificate presentation from outside your own network.
The CN vs. SAN confusion is also still surprisingly common. Admins look at the certificate, see the correct domain in the Common Name field, and conclude the certificate is fine. It isn’t fine if that domain isn’t also in the SAN list. Chrome made this call definitively years ago, and every other major browser followed. The SAN list is the only thing that matters for hostname validation.
The most practical habit I’d recommend: any time you add a domain, subdomain, or alias to your site, treat it as a certificate event. Check coverage immediately. Don’t wait for a visitor to report a warning. Automated monitoring through a tool like Otterwatch means you get a quiet heads-up before anyone else notices, which is a much better way to find out.
— Otis
Keep your certificates matching with Otterwatch

Otterwatch watches your SSL certificates so you don’t have to check manually after every domain change. It verifies certificate coverage, tracks expiration dates, and sends you a plain, friendly alert when something needs attention, well before visitors start seeing security warnings. There’s no dashboard to learn and no wall of red alerts. Otis just keeps an eye on things and lets you know calmly when action is needed. You can check any domain’s SSL certificate for free right now, or start monitoring up to five sites at no cost with Otterwatch’s free plan. No credit card required.
FAQ
What causes a domain certificate mismatch error?
A domain certificate mismatch occurs when the hostname in the browser does not match any entry in the certificate’s SAN list. The most common causes are missing apex or www variants, wildcard limitations on deep subdomains, and SNI misconfiguration on the server.
Why does my certificate work on www but not the root domain?
This is the classic apex vs. www mismatch. Your certificate likely lists www.example.com in the SAN field but not example.com (or vice versa). Reissue the certificate with both variants explicitly included in the SAN list.
Does fixing the certificate on my server always resolve the mismatch?
Not always. If you use a CDN, load balancer, or reverse proxy like Cloudflare or AWS CloudFront, the edge layer presents its own certificate during the TLS handshake. You must update the certificate at the edge as well as the origin.
What’s the difference between CN and SAN in SSL certificates?
The Common Name (CN) field is a legacy field that modern browsers no longer use for hostname validation. The Subject Alternative Name (SAN) list is the only field browsers check. If your domain appears only in CN and not in SAN, browsers will still show a mismatch error.
How do I check which hostnames my certificate actually covers?
Click the padlock in your browser, open the certificate details, and look for the Subject Alternative Names section. For a more thorough check, use openssl s_client -connect yourdomain.com:443 -servername yourdomain.com from a terminal, or run your domain through the Otterwatch SSL checker to see the full SAN list at a glance.
Recommended
- Blog · Otterwatch
- Wildcard vs SAN certificates — which one do you actually want? · Otterwatch
- Why your Let’s Encrypt auto-renewal silently failed (and how to catch it) · Otterwatch
- SSL Certificate Installation Explained for Small Sites · Otterwatch
Catch the next cert expiry before your users do.
Otterwatch checks your SSL certificates daily and emails you 30 days before they expire. Five sites free.
Start watching →