Skip to content

Troubleshooting guide

SSL handshake failed: causes and fixes

A failed TLS handshake means the browser and server could not agree on a secure connection. The certificate, its chain or the protocol settings are usually to blame.

3 min read9 sectionsUpdated

On this page

Key points

  • Expired certificates are the most common cause, and the easiest to prevent.
  • Missing intermediate certificates break some clients but not others.
  • The certificate must match the hostname, including www and subdomains.
  • openssl s_client shows exactly what the server presents.

Diagnose with openssl

bash
# Show the certificate chain the server presents (SNI set with -servername)
openssl s_client -connect example.com:443 -servername example.com -showcerts </dev/null

# Just the leaf certificate's subject, issuer, names and dates
openssl s_client -connect example.com:443 -servername example.com </dev/null 2>/dev/null \
  | openssl x509 -noout -subject -issuer -dates -ext subjectAltName

# Does the server accept TLS 1.2 and 1.3?
openssl s_client -connect example.com:443 -servername example.com -tls1_2 </dev/null | head -n 5
openssl s_client -connect example.com:443 -servername example.com -tls1_3 </dev/null | head -n 5

Causes and fixes

CauseWhat you seeFix
Expired certificatenotAfter is in the pastRenew; check auto-renewal (certbot timer, ACME client)
Name mismatchsubjectAltName lacks the hostnameIssue a certificate covering every hostname you serve
Missing intermediateVerify error "unable to get local issuer certificate"Serve the full chain (fullchain.pem), not only the leaf
Old protocol or ciphersHandshake fails on modern clientsEnable TLS 1.2 and 1.3 with modern ciphers
Wrong certificate for SNIA default certificate for another site is servedCheck server_name blocks and SNI routing
Clock skew on the client or server"Not yet valid" errorsFix NTP

Why auto-renewal still fails

Let's Encrypt certificates last 90 days and auto-renewal is reliable, until it is not: a DNS change breaks the HTTP-01 challenge, a firewall blocks port 80, the renewal hook does not reload Nginx, or the server running certbot was decommissioned. In each case the certificate renews quietly in a test, or not at all, and expires weeks later. That is why an independent expiry check matters even with automation. Read more in SSL certificate expiry monitoring.

Monitor certificates from outside

  • Alert 21 to 30 days before expiry, and again closer to the date.
  • Check every hostname that serves HTTPS, including API and status subdomains.
  • Check the chain the way a client would, not just the date.

VitalRix uptime monitoring includes SSL checks that warn before a certificate expires, alongside HTTP checks on the same hosts.

Frequently asked questions

Why does the site work in Chrome but fail in curl or on older phones?

Browsers can fetch missing intermediate certificates; many other clients cannot. Serve the full chain to fix it for everyone.

Is ERR_SSL_PROTOCOL_ERROR the same thing?

It is Chrome’s message for a handshake that failed at the protocol level, often because of a misconfigured server, a proxy, or a port serving plain HTTP on 443.

Check it now, free

Watch your own site and services with VitalRix

Uptime checks, APM, logs, real-user monitoring, alerts and status pages in one place. Every product has a free tier and no credit card is needed.