Skip to content
SSL and certificates3 min read

SSL handshake failed: causes and fixes

SSL handshake failed

Short answer

"SSL handshake failed" means the negotiation that precedes an encrypted connection broke down: the two sides couldn't agree on a TLS version or cipher, or the server didn't present a valid certificate for the requested name. Start by checking the certificate on the server, then the client's TLS version, then any proxy such as Cloudflare.

ArabyHost teamLast updated: ShareWhatsAppXLinkedIn
Contents
  1. Common causes
  2. How to diagnose it
  3. Fixes for site owners
  4. Fixes for visitors
  5. Prevention
  6. On ArabyHost

Before any data moves over HTTPS, the client (browser or app) and the server exchange a short series of messages called the handshake: they agree on a TLS version and cipher, and the server sends its certificate for the requested name. If any step breaks, you get this error. Browsers usually phrase it differently, e.g. ERR_SSL_PROTOCOL_ERROR; Cloudflare reports it as error 525; developer tools show things like curl: (35) or SSLHandshakeException.

Common causes

  • No valid certificate for that name on the server, so it presents a default certificate or drops the connection.
  • An outdated client that doesn’t support TLS 1.2 or newer, or doesn’t send the site name (SNI).
  • No shared cipher between what the server accepts and what the client offers. See ERR_SSL_VERSION_OR_CIPHER_MISMATCH.
  • Cloudflare set to Full or Full (strict) while your server has no valid certificate.
  • The wrong port, e.g. speaking HTTPS to a port that doesn’t run TLS.
  • A wrong device clock or an intercepting program, such as antivirus software or a corporate proxy.

How to diagnose it

If you have a command line (on your computer or over SSH), these two commands reveal most cases:

openssl s_client -connect example.com:443 -servername example.com
curl -vI https://example.com

In the openssl output, check the certificate subject and issuer, the line Verify return code: 0 (ok) and the protocol, e.g. TLSv1.3. Add -tls1_2 to test a specific version. If it fails with -servername but works with another name, the problem is that name’s certificate.

Fixes for site owners

  1. In cPanel, open Security » SSL/TLS Status and make sure the domain and www have a valid certificate. If not, click Run AutoSSL; if that fails, see AutoSSL failed.
  2. If the site is behind Cloudflare, set SSL mode to Full (strict) once the server certificate exists. Details in the Cloudflare with hosting guide.
  3. If the error comes from your own code calling an external service (such as a payment gateway), switch to a recent PHP version in Software » MultiPHP Manager; newer versions ship newer TLS libraries.
  4. Re-run the commands above until you see Verify return code: 0 (ok).

Fixes for visitors

  1. Correct the date and time on your device.
  2. Update the browser and operating system; very old systems don’t support current TLS versions.
  3. Temporarily disable HTTPS scanning in your antivirus, or try another network.

Prevention

  • Let certificates renew automatically and don’t remove the old one before the new one is in place.
  • When enabling Cloudflare, confirm the server has a certificate before choosing Full (strict).
  • Keep libraries and runtimes up to date in apps that call external services.

On ArabyHost

Sites run on LiteSpeed, and a free Let’s Encrypt certificate is issued automatically through AutoSSL for every domain that points to the server via ns1.arabicode.com and ns2.arabicode.com. That’s why handshake problems here usually trace back to the window before the certificate is issued, or to Cloudflare being enabled before its SSL mode is set. On AI/Developer plans you can run openssl and curl over SSH to diagnose, and the Araby AI assistant in the panel reads error logs and explains why outbound connections from your app fail.

FAQ

What's the difference between a handshake failure and an untrusted certificate?

With a handshake failure the encrypted connection never completes. With a certificate error the connection completes, but the browser refuses to trust the certificate and shows a page like "Your connection is not private".

Why does the site work in my browser but fail in a script or old app?

Modern browsers support TLS 1.2 and 1.3 and send SNI, while an old app, OpenSSL or Java build may use a version the server no longer accepts. Update the runtime or the HTTP library the app uses.

What does Cloudflare error 525 SSL handshake failed mean?

Cloudflare couldn't complete the handshake with your origin server, usually because the server has no valid certificate for the domain while Cloudflare's SSL mode is Full or Full (strict).

Useful? Share it with someone who needs it:WhatsAppXLinkedIn

Read next

Ready to put your idea online?

Fast, isolated hosting, support that understands you, and an AI assistant that fixes problems with you.