What 525 means
525 is not a standard HTTP status code; Cloudflare sends it from its edge. It means the TLS handshake between Cloudflare and your origin server failed. It only happens when the zone's SSL/TLS encryption mode is Full or Full (strict), the modes in which Cloudflare connects to the origin over HTTPS. The visitor's connection to Cloudflare is fine; the problem is the second leg, Cloudflare to origin.
HTTP/2 525
server: cloudflare
cf-ray: 8c1f2a3b4d5e6f70-NRT
content-type: text/html
<title>example.com | 525: SSL handshake failed</title>
If the handshake succeeds but the certificate fails validation in Full (strict), you get 526 instead.
Common causes
- No certificate configured for the site on the origin, or HTTPS not set up on port 443 at all.
- No SNI support: Cloudflare sends the host name in the TLS handshake (SNI), and the origin has no matching virtual host, or can't handle SNI.
- No shared cipher suite or protocol: the origin only accepts old or unusual ciphers or TLS versions that Cloudflare doesn't offer.
- A firewall or proxy on the origin that interrupts TLS connections from Cloudflare's IPs.
How to fix it
-
Test the handshake the way Cloudflare does, against the origin IP with SNI:
openssl s_client -connect 203.0.113.10:443 -servername example.comA working origin prints the certificate chain and a negotiated protocol and cipher. An immediate
handshake failureorno peer certificatepoints at the certificate, SNI or cipher configuration. -
Install a certificate on the origin for the hostname: a free Cloudflare Origin CA certificate (trusted by Cloudflare, not by browsers) or a publicly trusted one such as Let's Encrypt.
-
Check the virtual host answers for that name on 443: in nginx a
serverblock withlisten 443 ssl;,server_name example.com;andssl_certificate/ssl_certificate_key; in Apache a<VirtualHost *:443>withSSLEngine on. -
Use a modern TLS configuration: TLS 1.2 and 1.3 with current ECDHE cipher suites.
-
Allowlist Cloudflare's IP ranges on port 443 if a firewall or intrusion prevention tool sits in front of the server.
Switching the SSL mode to Flexible makes the error disappear, but only because Cloudflare then talks to the origin over plain HTTP. That leaves the second leg unencrypted and often causes redirect loops if the origin forces HTTPS. Fix the origin and use Full (strict).
525 and SEO
Googlebot gets the 525 from Cloudflare and treats it as a server error: crawling slows while it lasts, and URLs that keep failing for a long time are dropped from the index. Certificate renewals that go wrong are a common trigger, so monitor the origin certificate's expiry as well as the edge one.
Related codes
- 526 Invalid SSL Certificate: handshake fine, certificate rejected in Full (strict).
- 521 Web Server Is Down: nothing accepted the connection on port 443.
- 520 Web Server Returned an Unknown Error: the response after the handshake was unusable.
Check the certificate visitors see with the SSL Inspector, and the site's status through Cloudflare with the Redirect Checker.