- Home
- Cloudflare errors
Cloudflare 5xx errors explained
When Cloudflare shows a 52x error, the problem is almost always between Cloudflare and your origin server. Find your code below.
| Code | What happened | Look at first |
|---|---|---|
| 520 | Origin sent an empty or malformed response | App crashes, oversized headers |
| 521 | Origin refused the connection | Web server stopped, firewall blocking Cloudflare |
| 522 | Connection to the origin timed out | Firewall dropping packets, overloaded server, wrong DNS |
| 524 | Origin connected but sent nothing back for 125 s | Slow queries, long running requests |
| 525 | TLS handshake with the origin failed | No certificate on 443, cipher mismatch |
| 526 | Origin certificate is invalid | Expired, self-signed or wrong hostname in Full (strict) |
All Cloudflare error guides
ERROR 520
Cloudflare 520: Web server returned an unknown error
Unknown error from the origin.
ReadERROR 521Cloudflare 521: Web server is down
Origin refused the connection.
ReadERROR 522Cloudflare 522: Connection timed out
Connection to the origin timed out.
ReadERROR 524Cloudflare 524: A timeout occurred
Origin took too long to respond.
ReadERROR 525Cloudflare 525: SSL handshake failed
TLS handshake with the origin failed.
ReadERROR 526Cloudflare 526: Invalid SSL certificate
Origin certificate is invalid.
Read