Australian cloud for business software — built and run in Sydney since 2002

NetLeverage
NetLeverage

Cloudflare Error 525: SSL handshake failed

Technical article
Troubleshooting

About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.

Cloudflare Error 525 means the SSL handshake between Cloudflare and the origin failed while SSL/TLS mode is Full or Full (Strict). Restore a working TLS listener, or remove a key-exchange compliance setting the origin cannot meet. This is not Error 526, which is Full (strict) certificate validation.

What the symptom means

Cloudflare titles the fault "Error 525: SSL handshake failed" and states: "This error indicates that the SSL handshake between Cloudflare and the origin web server failed."

Error 525 occurs when both are true: the SSL handshake fails between Cloudflare and the origin, and "Full or Full (Strict) SSL is set in the Overview tab of your Cloudflare SSL/TLS app."

Full uses HTTPS to the origin without validating the origin certificate; Full (strict) adds validation. Error 525 is the handshake failing on those modes, not Flexible.

Likely causes

Cause What you see How to confirm
No valid SSL certificate installed 525 on all HTTPS origin fetches Origin has no certificate on the TLS port
Port 443 (or custom secure port) closed 525; nothing accepts TLS Listener and firewall on 443
No SNI support on the origin 525 for name-based HTTPS vhosts Origin TLS stack and vhost SNI configuration
Cipher suite mismatch 525 after a TLS hardening change Compare origin ciphers with Cloudflare's set
Key exchange compliance requirement 525 after enabling post-quantum or FIPS on the zone SSL/TLS > Overview > Origin connection & post-quantum encryption
Intermittent origin TLS reset Occasional 525 Origin SSL error log at the cf-ray timestamps

Prove the cause before changing anything

These steps only read.

  1. Confirm SSL/TLS > Overview shows Full or Full (Strict). Flexible does not use this handshake path.

  2. Confirm the origin accepts TLS on port 443 (or your custom secure port). Common causes include "No valid SSL certificate is installed", "Port 443 (or another custom secure port) is not open", "No SNI support", and cipher suite mismatch.

  3. Match intermittent 525 timestamps to the origin TLS error log (nginx includes SSL errors in its standard error log).

  4. Check SSL/TLS > Overview > Origin connection & post-quantum encryption. Destinations that lack the required key exchange return 525. Post-quantum hybrid advertises X25519MLKEM768; FIPS advertises only FIPS-approved curves.

Fix

Restore TLS on the origin

The Error 525 page tells you to contact the host to exclude common causes: no valid SSL certificate installed, port 443 (or another custom secure port) not open, no SNI support, and cipher suite mismatch. Ask the host to check those items and, if no certificate is installed, to generate and install a free Cloudflare origin CA certificate. Review origin logs from the 525 timestamps for handshake resets.

Remove a key-exchange compliance requirement the origin cannot meet

If Origin connection & post-quantum encryption forces a key agreement the origin lacks, remove the compliance requirement so Automatic key exchange (the default) can negotiate.

Record the compliance selection the dashboard shows first (it may be post-quantum hybrid, FIPS, or another value):

echo "origin_key_exchange=<selection shown in Overview>" > cloudflare-origin-key-exchange-before.txt

Risk: the next step changes which key agreements Cloudflare advertises to origins and for outbound Worker fetch() calls under the zone. Removing a compliance requirement stops enforcing that organisation's chosen algorithm set.

In SSL/TLS > Overview > Origin connection & post-quantum encryption, remove the compliance requirement. Retest the URL that returned 525.

To undo it: restore the selection in cloudflare-origin-key-exchange-before.txt.

Temporarily prove the origin without the proxy

As this article's own diagnostic step (the Error 525 page does not give a DNS-only test), save the DNS proxy state first:

echo "www.example.com proxied=yes" > cloudflare-dns-proxy-before.txt

Disruptive step: the next change sets the hostname to DNS-only (grey cloud), so browsers connect straight to the origin IP until you reverse it.

Set the record to DNS only long enough to test HTTPS on the origin. If direct HTTPS fails, repair the origin before returning to Full or Full (Strict).

To undo it: set the record back to Proxied per cloudflare-dns-proxy-before.txt.

Do not “fix” 525 with Flexible unless you accept HTTP to the origin. "If possible, Cloudflare strongly recommends using Full or Full (strict) modes to prevent malicious connections to your origin."

Example (illustrative): enabling post-quantum compliance returns 525 while the origin certificate on 443 is valid. Clearing the requirement so Automatic key exchange runs restores the handshake.

Confirm the fix

  1. With the hostname proxied under Full or Full (Strict), reload the URL; it should not return Error 525.
  2. Confirm port 443 still answers TLS.
  3. If you changed key-exchange compliance, confirm Workers egress still meets policy.

What to watch afterwards

  • Certificate renewals that break the TLS listener.
  • Firewall changes that close 443 to Cloudflare (Error 521 or 522).
  • New Origin connection & post-quantum encryption toggles.

Risks and limits

These steps have not been lab-tested.

Error 525 requires Full or Full (Strict); it is not Error 526's certificate-validation failure. Cloudflare does not recommend a specific compliance setting — that depends on your organisation's obligations. DNS-only removes proxy protections while grey-clouded.

Sources

  • Error 525 — Cloudflare, Last updated Nov 23, 2026, accessed 1 December 2026
  • Encryption modes — Cloudflare, Last updated Apr 16, 2026, accessed 1 December 2026