525 SSL Handshake Failed

Cloudflare could not complete a TLS handshake with the origin server.

Last updated . How this page is checked.

Status code525
Status textSSL Handshake Failed
Category5xx Server Error
Response has bodyUsually
Defined byCloudflare (not an IANA-registered code)

What does 525 SSL Handshake Failed mean?

Cloudflare could not complete a TLS handshake with the origin server. It is numbered in the 5xx Server Error range but is not a registered HTTP status code, so the general meaning of that class is only a rough guide to it.

When do APIs return 525?

On sites behind Cloudflare with the SSL mode set to Full or Full (strict), where Cloudflare connects to the origin over HTTPS. The handshake fails when the origin has no certificate installed, is not listening on port 443, or shares no TLS version or cipher suite with Cloudflare.

How to fix a 525 SSL Handshake Failed

Check that the origin serves HTTPS on port 443 with a certificate installed, and that it supports current TLS versions and the SNI extension. Testing the origin directly with curl -v against its IP address shows where the handshake stops.

Reproduce a 525 response

The fastest way to understand a status code is to trigger one and read the full response. Open the API tester and send a request to https://httpbin.org/status/525 — you will see the 525 status along with every response header the server sent. Comparing those headers against a working request is often what reveals the cause.

That response only imitates the number, which is useful for checking how your own client, alerting or retry logic treats a 525. A real one comes from the software named in the table above, in the circumstances this page describes.

When you are debugging a real endpoint, check the response headers as carefully as the body, and confirm you are using the right HTTP method for the operation.

Related 5xx status codes

See also

References