An SSL certificate error means the browser or client could not verify that the server is who it claims to be, so it refuses to continue or shows a warning. The word "SSL" is historic: the protocol in use today is TLS, but the term stuck. This guide covers the causes you will see most often, the error codes each one produces, and commands to diagnose them.
How certificate validation works
When you connect over HTTPS, the server sends its certificate and, ideally, the intermediate certificates that link it to a trusted root. The client then checks four things:
- The certificate is within its validity dates.
- The hostname matches a name in the certificate (the Subject Alternative Name list).
- The chain leads to a trusted root in the client's trust store.
- The certificate has not been revoked and is used for a valid purpose.
A failure in any one of these produces an error. The table summarizes the usual ones.
Error codes and what they mean
| Cause | Chrome / Edge | Firefox |
|---|---|---|
| Expired, or clock wrong | NET::ERR_CERT_DATE_INVALID | SEC_ERROR_EXPIRED_CERTIFICATE |
| Hostname mismatch | NET::ERR_CERT_COMMON_NAME_INVALID | SSL_ERROR_BAD_CERT_DOMAIN |
| Self-signed or unknown CA | NET::ERR_CERT_AUTHORITY_INVALID | SEC_ERROR_UNKNOWN_ISSUER |
| Missing intermediate | NET::ERR_CERT_AUTHORITY_INVALID (sometimes) | SEC_ERROR_UNKNOWN_ISSUER |
| Old TLS version only | ERR_SSL_VERSION_OR_CIPHER_MISMATCH | SSL_ERROR_UNSUPPORTED_VERSION |
Exact names vary between browser versions and tools such as curl, Java or Python report the same problems with different messages.
Common causes and fixes
1. Expired certificate
Certificates have a fixed lifetime. If renewal failed, the certificate expires and every client rejects it. Renew it, install the new files, and reload the web server. Automate renewal (for example with an ACME client) and monitor the days remaining.
2. Hostname mismatch
The name in the address bar must appear in the certificate. Typical cases are visiting example.com when the certificate covers only www.example.com, or reaching a server by IP address. Wildcard rules are strict: *.example.com matches www.example.com but not example.com itself, and not a.b.example.com. Reissue the certificate with all the names you serve.
3. Self-signed certificate
A self-signed certificate is signed by itself, so no public CA vouches for it. That is fine for local testing but not for public sites. Use a certificate from a public CA, or for an internal service, add your own CA to the clients that need to trust it. Avoid telling clients to skip verification (curl -k, verify=False) outside of quick experiments.
4. Incomplete chain (missing intermediate)
The server must send its certificate plus the intermediates. If it sends only the leaf, some browsers can fetch the missing intermediate and appear fine, while curl, Java, mobile apps and API clients fail. This is a very common "works in my browser, fails in my script" problem. Fix it by configuring the server with the full chain file provided by your CA.
5. Untrusted root
The chain ends at a root your client does not trust, which can happen on outdated systems that lack a newer root, or in networks that intercept TLS with a corporate CA. Update the operating system and CA bundle, or install the organization's root certificate where policy allows.
6. Clock skew
If your device clock is far off, a valid certificate looks expired or not yet valid. The browser reports a date error even though the site is fine. Sync the system clock with NTP before blaming the server.
7. Old TLS versions
TLS 1.0 and 1.1 are deprecated, and current browsers no longer accept them. A server that offers only those will fail to connect. Enable TLS 1.2 and 1.3 and disable the old ones.
8. Mixed content
Not a certificate error as such, but often confused with one. An HTTPS page that loads scripts, images or frames over plain HTTP shows a warning or has those resources blocked. Change the resource URLs to HTTPS.
Diagnose with openssl
These commands show what the server actually sends:
# show the chain and the verification result openssl s_client -connect example.com:443 -servername example.com -showcerts </dev/null # dates, subject, issuer and names of the leaf certificate openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null \ | openssl x509 -noout -dates -subject -issuer -ext subjectAltName # test which TLS versions the server accepts openssl s_client -connect example.com:443 -servername example.com -tls1_2 </dev/null openssl s_client -connect example.com:443 -servername example.com -tls1_3 </dev/null
In the output, look for Verify return code: 0 (ok) at the end. A code such as 21 (unable to verify the first certificate) usually means a missing intermediate, 18 or 19 mean self-signed, and 10 means expired. The -servername flag matters: without it, a server hosting several sites may return the wrong certificate. The -ext option requires a recent OpenSSL.
Check it with our tools
The SSL checker performs these checks for you on a public host: it verifies the chain, the hostname and expiry, shows which TLS versions are supported, and gives a grade. An untrusted, expired or mismatched certificate is graded F. After the certificate is fixed, run the headers analyzer to see whether the site also sends HSTS and other security headers, and to follow the redirect chain from HTTP to HTTPS.
Errors when using proxies
Certificate errors can appear when traffic goes through an HTTPS-intercepting proxy, because the proxy presents its own certificate. If an error appears only when the proxy is on, the proxy is likely inspecting traffic. A plain HTTP CONNECT or SOCKS5 proxy does not alter certificates. Compare the issuer shown in the browser with the real one to tell. Related: HTTP vs SOCKS5 proxy.