SSL Handshake Failed (Error 525): Causes & How to Fix It
Key takeaway
"SSL handshake failed" means the two ends of an HTTPS connection couldn't agree on how to encrypt it, so it stopped before any page was sent. On a Cloudflare site it shows as Error 525: Cloudflare reached the site's own server, but the handshake there failed. The usual causes are no valid certificate on that server, port 443 closed, no SNI, or no shared TLS version or cipher. Visitors can only wait; the site's owner fixes the server.
Check it now

Start reading
What Does SSL Handshake Failed Mean?
Before a page is sent over HTTPS, the two sides run a short exchange called the TLS handshake (TLS is today's name for SSL). The client offers the TLS versions and cipher suites it supports, the server picks one and sends its certificate, and both confirm the keys. If they can't agree, one side sends an alert and closes the connection. The handshake failed, and no page loads.
The most common alert is handshake_failure. The TLS 1.3 standard defines it as the sender being "unable to negotiate an acceptable set of security parameters given the options available". (RFC 8446) Other alerts name a more specific problem:
| Alert (number) | What it means | Often behind it |
|---|---|---|
| handshake_failure (40) | No acceptable set of security parameters | No shared cipher suite or TLS version |
| protocol_version (70) | The version is recognized but not supported | A client or server stuck on TLS 1.0 or 1.1 |
| insufficient_security (71) | The server wants stronger parameters than the client offers | Old ciphers on the client |
| unrecognized_name (112) | No site with the name sent in SNI | The server has no site or certificate for that name |
| certificate_required (116) | The server wanted a client certificate and got none | A server that requires client certificates |
| bad_certificate (42) | A certificate was corrupt or its signatures didn't verify | A broken or wrongly installed certificate |
Where You See "SSL Handshake Failed"
The same failure has a different name in every program. What matters is which two sides couldn't agree:
| Where | What it says | Who couldn't agree |
|---|---|---|
| A site behind Cloudflare | Error 525: SSL handshake failed | Cloudflare and the site's own server |
| Chrome, Edge | ERR_SSL_PROTOCOL_ERROR (-107) | Your browser and the site |
| Chrome, Edge | ERR_SSL_VERSION_OR_CIPHER_MISMATCH (-113) | Your browser and the site: no shared version or cipher |
| curl | Error 35, CURLE_SSL_CONNECT_ERROR | curl and the server |
| Java apps | SSLHandshakeException | The app and the server |
Chromium defines -107 as "An SSL protocol error occurred" and -113 as "The client and server don't support a common SSL protocol version or cipher suite". (Chromium) curl's error 35 is "A problem occurred somewhere in the SSL/TLS handshake" (curl), and Java's exception means "the client and server could not negotiate the desired level of security". (Oracle)
Cloudflare Error 525: Why It Happens
Cloudflare sits between visitors and the site's own server, called the origin. Like Error 520, Error 525 is about the connection behind Cloudflare, not yours. Error 525 appears only when two things are true: the handshake between Cloudflare and the origin fails, and the site's SSL/TLS encryption mode is Full or Full (strict), the modes in which Cloudflare connects to the origin over HTTPS. (Cloudflare)
Cloudflare names four common causes at the origin:
- No valid SSL certificate is installed.
- Port 443 (or the custom secure port) isn't open.
- No SNI support, so the server can't tell which site's certificate to send when several sites share one IP address.
- The cipher suites Cloudflare uses don't match any the origin supports.
The two modes ask different things of the origin. Full needs any certificate on port 443, even a self-signed one. (Cloudflare) Full (strict) also needs it unexpired, issued by a public CA or Cloudflare's Origin CA, and matching the hostname. (Cloudflare) A certificate that fails those checks gives a different error, 526: "Cloudflare is unable to verify the SSL certificate on your origin server". (Cloudflare)
How to Fix It as a Visitor
If you see Error 525, the problem is between Cloudflare and the site's server, so no setting on your device changes it. Reload in a few minutes, and if it lasts, tell the site's owner: they're the only one who can fix it.
If your browser shows its own error instead, the handshake failed between your browser and the site. The guides for ERR_SSL_PROTOCOL_ERROR and ERR_SSL_VERSION_OR_CIPHER_MISMATCH cover what you can try on your side.
Test the Handshake Yourself
Check the server from outside your own network. The SSL Checker below makes its own handshake with the site and shows the TLS versions and ciphers it accepts, the certificate chain and whether the name matches.
Check a site's TLS handshake
On a Cloudflare site, any outside check meets Cloudflare, not your origin. Test the origin directly from a terminal: curl's --resolve sends the request to an address you choose, "a sort of /etc/hosts alternative" (curl), and openssl's -servername sets the SNI name the origin needs to pick the right certificate. (OpenSSL)
curl -v --resolve example.com:443:203.0.113.10 https://example.com/
openssl s_client -connect 203.0.113.10:443 -servername example.comHow to Fix It on Your Server
Work through Cloudflare's four causes on the origin, in this order:
- Install a valid certificate for every name the site serves. On a Cloudflare site, a free Cloudflare Origin CA certificate works for the origin.
- Open port 443 in the server's firewall and your host's. A port checker shows whether it answers from outside.
- Turn on TLS 1.2 and TLS 1.3, and turn off TLS 1.0 and 1.1, which RFC 8996 forbids.
- Check SNI: with several sites on one IP, each name must get its own certificate. Inspect the one the server sends with a certificate decoder.
- Offer cipher suites Cloudflare supports, then test again.
If 525s come and go rather than every time, read the origin's TLS error log at the moments they happen: Cloudflare points to Apache's mod_ssl log and nginx's error log, which may need a higher log level. (Cloudflare) A certificate chain that's missing an intermediate shows up as a verification error rather than a failed handshake; see how the certificate chain works.
Does your server's TLS handshake work?
DNS Robot's free SSL Checker makes a real TLS handshake with any site and shows the versions and ciphers it accepts, its certificate chain and whether the name matches.
Sources
- Error 525, Cloudflare
- Error 526, Cloudflare
- Encryption modes, Cloudflare
- Full (strict), Cloudflare
- Flexible, Cloudflare
- RFC 8446: The Transport Layer Security (TLS) Protocol Version 1.3, IETF
- RFC 8996: Deprecating TLS 1.0 and TLS 1.1, IETF
- net_error_list.h, Chromium
- libcurl error codes, curl
- curl man page (--resolve), curl
- openssl-s_client, OpenSSL
- SSLHandshakeException, Oracle
Frequently Asked Questions
What does SSL handshake failed mean?
What is Cloudflare Error 525?
Is Error 525 my fault as a visitor?
What's the difference between Error 525 and Error 526?
Does switching Cloudflare to Flexible fix Error 525?
How do I fix an SSL handshake failure in Chrome?
What does curl error 35 mean?
Which TLS versions should a server support?
Related Articles
Related Tools
SSL Certificate Check
Verify SSL certificate validity and security details
Port Checker
Test port connectivity and service availability
Certificate Decoder
Decode an SSL certificate or a whole chain: every field, each link checked, trust in the 4 browser root stores, PEM and DER
DNS Lookup
Every DNS record from the domain's own nameservers, beside Google's and Cloudflare's cache



