How to Fix SSL Handshake Failed Errors
SSL handshake failed: start with a direct test
openssl s_client -connect example.com:443 -servername example.com
If this prints a certificate and Verify return code: 0, the server side is mostly fine and the issue is client side. If it ends with an alert such as handshake failure or no peer certificate, read on.
SSL handshake failed: common causes
| Cause | Typical sign | Fix |
|---|---|---|
| Nothing listening on 443 | Connection refused or timeout | Enable the SSL vhost, open the firewall |
| No protocol overlap | alert protocol version | Allow TLS 1.2 and 1.3 on the server, upgrade the old client |
| No shared cipher | alert handshake failure | Use a modern cipher list, do not hand-pick old ones |
| SNI missing or wrong | Default certificate returned | Set the correct server_name, use a client that sends SNI |
| Bad certificate | Expired, wrong name, missing chain | Reissue or install the full chain |
| Wrong key | Server fails to start or fails handshakes | Use the key that matches the certificate |
Server configuration to check
listen 443 ssl http2;
server_name example.com www.example.com;
ssl_certificate /etc/ssl/example/fullchain.pem;
ssl_certificate_key /etc/ssl/example/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
Run sudo nginx -t or apachectl configtest before reloading. Look in the error log, which usually names the failing step.
The IPv6 trap
If the site works on your laptop but fails on mobile data, check the AAAA record with the DNS Lookup tool. Carriers prefer IPv6. An AAAA record pointing to an old server or a parked page without your certificate makes only those visitors fail. Remove the record or point it to a server that has the certificate.
Behind Cloudflare or a proxy
Error 525 means Cloudflare could not complete the handshake with your origin. Confirm that the origin serves a certificate on 443, accepts TLS 1.2 or higher and has SNI for the hostname. Error 526 means the certificate was rejected in Full (strict) mode.
Verify
Scan with the SSL Checker for the chain and protocols, and use the SSL/CSR Decoder if you need to read a specific certificate. Test from another network and, if possible, from the failing client again.
If the problem persists
Capture a packet trace with a tool such as Wireshark, or run openssl s_client -debug, to see the alert the server sends. Compare a working host with the failing one for protocol and cipher differences. Check whether a recent change touched the web server, firewall, load balancer or CDN. As a last step, test with a minimal config on a spare port to separate your site settings from the base TLS setup.
Related reading: Cloudflare error 525 and fixing certificate chain errors.
Frequently Asked Questions
What does "handshake failure" mean exactly?
The TLS negotiation ended with an alert. The cause may be protocol, cipher, certificate or SNI, so you test each.
Why does it only fail on old devices?
They may not support TLS 1.2 or modern ciphers, or lack the newer root certificates.
Do I need to restart the server after changes?
Reload or restart the web server after changing certificates or TLS settings.
Can a firewall cause a handshake failure?
Yes. Some firewalls and security tools interfere with TLS. Test from a different network to rule that out.
What does handshake failure mean exactly?
The TLS negotiation ended with an alert. The cause may be protocol, cipher, certificate or SNI, so you test each.
Why does it only fail on old devices?
They may not support TLS 1.2 or modern ciphers, or lack the newer root certificates.
Do I need to restart the server after changes?
Reload or restart the web server after changing certificates or TLS settings.
Can a firewall cause a handshake failure?
Yes. Some firewalls and security tools interfere with TLS. Test from a different network to rule that out.
Why does it fail on mobile data but work on wifi?
Check the AAAA record. Carriers prefer IPv6, and an old AAAA record pointing at a server without the certificate breaks only those visitors.
✅ Post-Installation Verification & SEO Checklist
After applying the steps above, run through this 5-point checklist to prevent browser warnings and protect your Google SEO rankings:
- Verify full CA chain trust and TLS 1.3 support using our Live SSL Checker.
- Scan for Mixed Content HTTP links and check HSTS/CSP headers on Security Headers Checker.
- Enforce a permanent 301 HTTP-to-HTTPS redirect with our HTTPS Redirect Generator.
- Confirm both root and
wwwversions resolve cleanly to one canonical HTTPS URL. - Verify your HTTPS property and
sitemap.xmlinside Google Search Console and Bing Webmaster Tools.