HTTP 525 SSL Handshake Failed β What It Means and How to Fix It
Learn what error 525 means, why the TLS handshake between edge and origin failed, and which certificate and cipher issues cause it.
Error 525 is generated at the edge when a TCP connection to the origin succeeded but the TLS handshake between edge and origin failed. Connectivity is fine; encryption negotiation is not.
1. What It Means
The edge reached the origin and could not establish TLS with it.
- Not a connectivity failure. That produces 521 or 522.
- Not a timeout. That produces 524.
- The failure is in the handshake between edge and origin, not between visitor and edge.
2. Common Causes
| Cause | Detail |
|---|---|
| No certificate on the origin | Nothing to present for the handshake |
| Expired origin certificate | Validity period has passed |
| Hostname mismatch | The certificate does not cover the requested name |
| Cipher mismatch | No mutually acceptable suite between edge and origin |
| Wrong SSL mode | Full mode configured while the origin serves plain HTTP |
| SNI not handled | The origin serves many sites and cannot select one |
| Missing intermediates | The chain is incomplete |
The wrong-mode case is the most common: the proxy is configured to connect to the origin over HTTPS while the origin listens only on plain HTTP.
3. Diagnosing It
Test the handshake against the origin directly, bypassing the edge:
openssl s_client -connect origin.example.com:443 -servername example.com </dev/null 2>&1 | head -25
That shows the certificate presented, its validity, its chain, and whether the handshake completes. Reproducing the failure here confirms the edge is reporting accurately.
Then force a version to test for a protocol mismatch:
openssl s_client -connect origin.example.com:443 -tls1_2 </dev/null
4. How to Fix It
- Install a valid certificate on the origin, covering the hostname in use.
- Renew if expired, and monitor expiry independently of the renewal automation.
- Serve the full chain, including intermediates.
- Align the SSL mode β if the origin serves only plain HTTP, the proxy must not be set to require HTTPS to it.
- Confirm SNI handling where the origin hosts several sites.
- Review cipher policy if it has been hardened recently.
5. Certificate Requirements Are Modest
An origin certificate only needs to be acceptable to the edge, not to public browsers, since visitors terminate TLS at the edge. Many proxies issue their own origin certificates for exactly this purpose.
That makes the fix cheaper than it first appears β a publicly trusted certificate is not required for the origin leg.
6. What Visitors Can Do
Nothing. Error 525 is entirely an origin configuration problem, and only the site's operator can resolve it.
For collection, treat it as a site-side outage and re-attempt on a long interval rather than looping.
7. Related Errors
- 521 β the origin refused the connection.
- 522 β the connection attempt timed out.
- 523 β the origin was unroutable.
- 524 β the origin was slow to respond.
- 526 β the origin certificate is invalid, where validation is strictly enforced.
The progression is useful: 521 refused, 522 no answer, 523 unroutable, 524 too slow, 525 handshake failed.
8. Summary
Error 525 means the edge connected to the origin and could not complete a TLS handshake with it β usually a missing, expired, or mismatched origin certificate, or an SSL mode expecting HTTPS from an origin serving plain HTTP.
Diagnose by handshaking with the origin directly. Visitors cannot resolve it; the fix is entirely on the origin.