This error indicates that the SSL handshake between Cloudflare and the origin web server failed.
Error 525 occurs when these two conditions are true:
- The SSL handshake ↗︎ fails between Cloudflare and the origin web server.
- Full or Full (Strict) SSL is set in the Overview tab of your Cloudflare SSL/TLS app.
Contact your hosting provider to exclude the following common causes at your origin web server:
- No valid SSL certificate is installed.
- Port
443(or another custom secure port) is not open. - No SNI support.
- The cipher suites used by Cloudflare do not match the cipher suites supported by the origin web server.
- A key exchange compliance requirement is enabled for your zone, but the destination server does not support the required key exchange algorithm. Refer to Key exchange compliance requirements.
-
Verify that a certificate is installed on your origin server. For details on running tests, refer to Troubleshoot requests with curl. If no certificate is installed, you can generate and install a free Cloudflare origin CA certificate to encrypt traffic between Cloudflare and your origin web server.
-
Review the cipher suites used by your server to ensure they are compatible with Cloudflare.
-
Check your server's error logs from the timestamps when
525errors occur to identify any issues causing the connection to be reset during the SSL handshake.
Use Origin Analytics to check whether SSL handshake failures are affecting specific endpoints. The Origin status codes chart shows when Cloudflare received no HTTP response from your origin (originResponseStatus of 0), which can indicate TLS negotiation failures. Cross-reference these timestamps with your origin SSL error logs to pinpoint the cause.
If your zone has a compliance requirement enabled (SSL/TLS > Overview > Origin connection & post-quantum encryption), Cloudflare restricts outbound TLS 1.3 connections to only the key agreements permitted by that requirement. Destination servers that do not support the required key exchange algorithm will fail the handshake and return a 525 error.
For example:
- Post-quantum hybrid: Cloudflare only advertises post-quantum hybrid key agreements (
X25519MLKEM768). Destinations that do not support post-quantum key exchange will return525. - FIPS: Cloudflare only advertises FIPS-approved curves. Destinations that do not support FIPS-approved curves (for example, those that only support X25519) will return
525.
This setting affects:
- Connections from Cloudflare to your origin server.
- Outbound
fetch()calls from Workers running under that zone, including requests to third-party APIs that may not yet support post-quantum key exchange.
To resolve this, go to SSL/TLS > Overview > Origin connection & post-quantum encryption and remove the compliance requirement. Automatic key exchange (the default, with no compliance requirements selected) negotiates the best mutually supported key agreement and maintains compatibility with a wide range of servers.