SSL/TLS certificate errors: the 7 most common failures and how to fix them
When HTTPS breaks, it breaks loudly: a full-screen browser warning, an API that stops answering, a checkout that loses every customer at the last step. Almost every SSL/TLS failure in production is one of seven recurring mistakes — each diagnosable from your laptop in under a minute.
1Expired certificate
The classic. Certificates have hard lifetimes — Let's Encrypt issues 90-day certs, and even paid certs max out at 398 days. One missed renewal and every visitor sees NET::ERR_CERT_DATE_INVALID. It still happens to large companies because renewal lived in someone's calendar.
echo | openssl s_client -connect example.com:443 -servername example.com 2>/dev/null \
| openssl x509 -noout -dates
2Incomplete certificate chain
Your server sends only the leaf certificate and skips the intermediate. Browsers on desktop often mask this by caching intermediates from other sites — then Android phones, API clients and older browsers fail with unable to get local issuer certificate. This is why "it works in my Chrome" proves nothing.
openssl s_client -connect example.com:443 -servername example.com
# Look for: "Verify return code: 21 (unable to verify the first certificate)"
fullchain.pem, not cert.pem in certbot terms). Test with a fresh client — curl -v https://your-site from a clean machine, or an SSL test service.3Mixed content
The page loads over HTTPS but pulls images, scripts or CSS over plain HTTP. Browsers block active mixed content (scripts, iframes) outright and increasingly auto-upgrade or warn on the rest. The usual source: hardcoded http:// URLs in templates, old CMS content, or a third-party widget.
grep -r "http://" over your templates and database exports.Content-Security-Policy: upgrade-insecure-requests header as a safety net while you clean up.4Name mismatch and forgotten subdomains
The certificate covers example.com but visitors hit www.example.com — or a new shop.example.com subdomain launches and nobody extended the cert. Result: NET::ERR_CERT_COMMON_NAME_INVALID. This bites hardest after migrations, when an old wildcard got replaced by a single-name cert.
echo | openssl s_client -connect www.example.com:443 -servername www.example.com 2>/dev/null \
| openssl x509 -noout -ext subjectAltName
a.b.example.com.5Weak protocol versions and cipher suites
TLS 1.0 and 1.1 are deprecated and flagged by every scanner and PCI audit; some payment flows now hard-fail on them. The opposite failure also exists: disabling everything except TLS 1.3 breaks older-but-legitimate clients, especially embedded devices and some corporate proxies.
# Test which protocol versions your server accepts:
for v in tls1 tls1_1 tls1_2 tls1_3; do
echo | openssl s_client -connect example.com:443 -$v 2>/dev/null \
| grep -q "Cipher :" && echo "$v: accepted" || echo "$v: refused"
done
6HTTP not redirecting to HTTPS — or redirecting badly
The certificate is perfect, but http:// still serves content, or redirects through a three-hop chain before landing on HTTPS. Beyond the SEO cost of redirect chains, every plain-HTTP response is an interception opportunity — and without HSTS, returning visitors can still be downgraded.
curl -sI http://example.com | head -5
# You want: a single 301 to https://example.com/... and nothing else
Strict-Transport-Security: max-age=31536000; includeSubDomains once you've confirmed every subdomain is HTTPS-ready.7The "invisible" failures: OCSP stapling, SNI and renewals behind a CDN
Three quieter ones. OCSP stapling disabled adds a revocation-check round trip to every handshake. SNI misconfiguration means clients that don't send a server name get the wrong default certificate. And CDN edge certificates renew on the provider's schedule, not yours: your origin cert can be perfect while the edge cert lapsed.
ssl_stapling on; in nginx), set a sane default server block for non-SNI clients, and monitor the certificate users actually see — the edge one — not the origin's.The 60-second audit
| Check | Command | Pass condition |
|---|---|---|
| Expiry | openssl x509 -noout -dates | >14 days remaining |
| Chain | openssl s_client -connect host:443 | Verify return code: 0 |
| Names | openssl x509 -noout -ext subjectAltName | Every hostname in SAN |
| Protocols | s_client -tls1_2 / -tls1_3 | 1.2+1.3 only |
| Redirect | curl -sI http://host | Single 301 → HTTPS |
| HSTS | curl -sI https://host | grep -i strict | max-age ≥ 6 months |
Run this monthly and after every infra change. Visitors don't file bug reports when the browser warning appears — they just leave.
SITEDOCTOR checks your SSL certificate, chain, protocols, HTTPS redirect, HSTS and mixed content automatically — plus security headers, SEO and speed — in one scan. Free instant scan, no signup.
Get a free scan →