Cloudflare Error Codes & Fixes
Cloudflare-specific edge error codes (520-530 range) — distinct from standard HTTP status codes. Each guide includes root cause analysis, diagnostic commands, and step-by-step resolution.
Cloudflare Error 520: Web Server Returns an Unknown Error
Cloudflare received an empty, reset, or otherwise unparseable response from your origin server.
Cloudflare Error 521: Web Server Is Down
Cloudflare cannot establish a connection to your origin server at all — it's actively refusing connections.
$ systemctl status nginxCloudflare Error 522: Connection Timed Out
Cloudflare's connection attempt to your origin server timed out — the server is reachable at the network level but not responding in time.
$ ss -tnCloudflare Error 524: A Timeout Occurred
Cloudflare connected to origin, but origin failed to return an HTTP response within 100 seconds.
$ top -b -n 1Cloudflare Error 525: SSL Handshake Failed
Cloudflare could not complete an SSL/TLS handshake with your origin server.
$ openssl s_client -connect origin-ip:443 -servername yourdomain.comCloudflare Error 526: Invalid SSL Certificate
Cloudflare completed the SSL handshake but the origin's certificate failed validation under "Full (strict)" mode.
$ openssl s_client -connect origin-ip:443 -showcerts