Cloudflare error 525: SSL handshake failed
Cloudflare couldn't set up HTTPS with your origin. What the SSL modes mean, the common causes, and the quick fix with an Origin CA certificate.
· 3 min read · By the Spot Downtime team
Error 525: SSL handshake failed means Cloudflare tried to open an encrypted connection to your origin server and the handshake failed before any HTTP was exchanged. It only happens when Cloudflare's SSL mode is Full or Full (strict), because those are the modes that encrypt the connection to your server.
Cloudflare's SSL modes, briefly
| Mode | Visitor → Cloudflare | Cloudflare → your server |
|---|---|---|
| Flexible | HTTPS | Plain HTTP (not recommended) |
| Full | HTTPS | HTTPS, any certificate |
| Full (strict) | HTTPS | HTTPS, valid trusted certificate (recommended) |
Common causes
Nothing is serving HTTPS on the origin
Port 443 isn't open, or the web server has no HTTPS site configured, so Cloudflare's TLS handshake gets nowhere. This is common right after switching from Flexible to Full.
No certificate for this hostname (SNI)
Cloudflare sends the hostname during the handshake (SNI). If your server has HTTPS set up for other domains but not this one, it may abort the handshake.
No shared TLS version or cipher
An old server limited to outdated protocols, or a very locked-down config, may have nothing in common with what Cloudflare offers. TLS 1.2 and 1.3 with modern ciphers work.
A firewall interfering
Something between Cloudflare and the server resets connections on port 443 partway through the handshake.
How to diagnose it
Test the handshake directly against your origin IP, sending the right hostname:
openssl s_client -connect 203.0.113.10:443 -servername example.com </dev/nullIf that fails, the server isn't set up for HTTPS on this name. If it shows a certificate, check it covers the domain and has a full chain.
Open port checkerConfirm port 443 is open on your origin server.SSL certificate checkerCheck a certificate's names, expiry and chain.The easy fix: a Cloudflare Origin CA certificate
If the handshake succeeds but the certificate is rejected, you'll see error 526 instead.
Keep reading
- Cloudflare errors · TroubleshootingCloudflare error 520: web server is returning an unknown errorCloudflare's catch-all error means your origin sent something empty or invalid. The usual causes and how to test your origin directly, bypassing Cloudflare.October 5, 2026 · 3 min read
- Cloudflare errors · TroubleshootingCloudflare error 521: web server is downYour origin refused Cloudflare's connection. How to tell whether the web server is stopped or a firewall is blocking Cloudflare, and how to fix both.October 5, 2026 · 3 min read