- Cloudflare
Cloudflare Error 525: SSL handshake failed
Also seen in: Cloudflare Full, Cloudflare Full (strict)
In one sentence
Cloudflare could not complete TLS with your origin; test the origin's listener, server name and TLS configuration before changing certificates or encryption settings.
Where you see it
A Cloudflare-proxied site returns:
Error 525: SSL handshake failed
The browser connected to Cloudflare. The failure is on the separate connection from Cloudflare to your origin server. Cloudflare’s reference identifies this error with Full or Full (strict) encryption.
| Error | Failing check | Start here |
|---|---|---|
| 525 | Cloudflare could not complete the origin TLS handshake | Listener, SNI, certificate binding, protocol and cipher compatibility |
| 526 | Cloudflare rejected the origin certificate under strict validation | Name, dates, chain and issuer trust |
A renewed edge certificate does not replace the certificate installed at your origin. Record the failing hostname, time and Cloudflare Ray ID before investigating; intermittent failures are much easier to find with that context.
What it means
The origin and Cloudflare failed to establish their TLS handshake. A certificate may be missing or unusable, the wrong virtual host may answer, or the two sides may not agree on TLS settings. If you are a visitor, report the details to the site operator. Clearing browser certificates cannot repair this connection.
Likely causes
The origin does not serve TLS on the expected address and port
Find the actual origin address in the site’s DNS or load-balancer configuration. Public DNS for a proxied hostname normally returns Cloudflare’s addresses, so testing that answer only tests the edge again.
On a Linux origin:
sudo ss -ltnp 'sport = :443'
sudo nginx -t
Use your server’s equivalent configuration check for Apache or another proxy. Check the configured custom origin port too, if you use one. Make sure the load balancer, security group and host firewall permit the intended Cloudflare traffic. Use Cloudflare’s published address list when maintaining an origin allow-list.
Test from an authorised network; a deliberately restricted origin may reject your laptop while accepting Cloudflare. A blocked direct diagnostic is evidence about that network path, not proof of the site’s failure.
The wrong virtual host answers
Replace the documentation address below with your origin IP and use the visitor-facing hostname, or the explicit origin SNI override configured in Cloudflare:
openssl s_client -connect 203.0.113.10:443 \
-servername www.example.com -brief </dev/null
Server Name Indication (SNI) tells a shared server which certificate and site to select. Connecting to an IP without -servername can hit its default site. Compare the peer certificate and negotiated protocol with the intended virtual host. Verification warnings still matter; this command is a diagnostic and does not establish that strict validation succeeded.
For an origin using a publicly trusted certificate:
curl --resolve www.example.com:443:203.0.113.10 \
--connect-timeout 10 --head https://www.example.com/
--resolve connects directly while retaining the URL hostname for SNI and certificate verification. An HTTP response shows that this client completed TLS. A 405 response can simply mean the application does not allow HEAD.
The origin certificate or private key is not usable
Inspect the server error log around the recorded failure. Confirm the configured certificate file exists, the service can read its key, and the key matches the certificate. Use the NGINX installation guide for correct leaf-plus-intermediate configuration and a tested reload.
A Cloudflare Origin CA certificate is trusted by Cloudflare but is not normally trusted by a browser or ordinary curl installation. For a direct test, obtain the appropriate Origin CA root from Cloudflare’s official documentation and add --cacert /path/to/origin-ca-root.pem to curl. Do not classify that intentional trust boundary as a broken public certificate.
TLS policy or one backend differs
If the listener and binding are correct, compare your origin’s enabled protocols and ciphers with Cloudflare’s origin cipher documentation. Use the TLS configuration guide to correct obsolete or incompatible settings.
Repeat the direct test for every configured IPv4, IPv6 and load-balancer backend. One server can still have an old key path or failed deployment while the others work. Correlate the failing times with origin TLS errors rather than repeatedly renewing a certificate that is already valid.
Check yours
Inspect only the origin’s public certificate chain. After the direct test succeeds, repeat the original proxied URL and check that the 525 stops on every backend.
Learn why
- The TLS handshake and certificate chains.
- Cloudflare 526: invalid SSL certificate.
- Cloudflare’s 525 reference and Full (strict).
Does your team keep hitting this?
Everyone can use the lessons. Team seats add earned credentials, invitations and a completion report, so you see who has finished.
Early edition. Written with AI assistance and checked against primary sources; an independent expert review is planned. Found a mistake? Tell us.