Skip to content

Error 525

Error 525: SSL handshake failed

This error indicates that the SSL handshake between Cloudflare and the origin web server failed.

Common causes

Error 525 occurs when these two conditions are true:

Resolution

Contact your hosting provider to exclude the following common causes at your origin web server:

  • 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 525 errors occur to identify any issues causing the connection to be reset during the SSL handshake.

Diagnose with Origin Analytics

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.

Key exchange compliance requirements

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 return 525.
  • 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.

Was this helpful?