SSL Handshake Failed: All Causes and Fixes
"SSL handshake failed" is one of the most frustrating errors because it can stem from a dozen different causes. This guide covers every common scenario with specific diagnostics and fixes for each.
What Happens During a TLS Handshake
The handshake is a multi-step negotiation that must succeed before any data is exchanged. If any step fails, the connection is terminated with a handshake failure:
Cause 1: Cipher Suite Mismatch
Client and server share no common cipher suites. You will see: handshake_failure (40) or no ciphers available.
Cause 2: TLS Protocol Version Mismatch
Client requires TLS 1.2+ but server only offers TLS 1.0/1.1 (or vice versa if client is old).
Ensure server supports TLSv1.2 TLSv1.3 minimum. For Nginx: ssl_protocols TLSv1.2 TLSv1.3;
Cause 3: Certificate Validation Failure
certificate has expiredRenew the certificate immediately. Check auto-renewal configuration.
hostname/IP does not matchCertificate CN/SAN does not cover this domain. Reissue with correct domains in the SAN.
certificate not trustedSelf-signed or from unknown CA. Install a certificate from a trusted CA, or add CA to client trust store for internal use.
incomplete chainAdd intermediate certificates to the ssl_certificate file (fullchain.pem).
Cause 4: SNI (Server Name Indication) Issues
SNI allows multiple certificates on one IP. If the client does not send SNI, the server may present the wrong certificate.
Old clients (Java 6, Android 2.x, IE 6 on XP) do not support SNI. If you must support them, use a dedicated IP per certificate or a unified certificate (multi-domain).
Cause 5: Firewall or Middlebox Interference
DPI (Deep Packet Inspection) firewalls, IDS/IPS, and enterprise proxies can corrupt or terminate TLS handshakes. Symptoms: works on some networks, fails on others; works without VPN, fails with VPN.
Cause 6: Client Certificate (mTLS) Issues
For mutual TLS (mTLS) setups, the server requires a client certificate. Error: certificate required. Ensure your API client is configured with the correct client certificate and private key. Check that the client cert was signed by the CA your server trusts for client auth.
Keep your SSL healthy
Most SSL handshake failures stem from expired certificates or configuration drift. CertNotify monitors your certificate health 24/7 and alerts you before problems reach users.