How does error 520 differ from other common HTTP 5xx errors like 500 (Internal Server Error) or 502 (Bad Gateway)?

Responsive Ad Header

Question

Grade: Education Subject: Support
How does error 520 differ from other common HTTP 5xx errors like 500 (Internal Server Error) or 502 (Bad Gateway)?
Asked by:
114 Viewed 114 Answers

Answer (114)

Best Answer
(451)
While all 5xx errors indicate a server-side problem, a 500 Internal Server Error is a generic message for an unexpected server condition. A 502 Bad Gateway means a proxy server (like Cloudflare) received an invalid response from an upstream server. A 520 is more specific; it's a Cloudflare-only error indicating the origin server sent an 'unknown' or unparseable response to Cloudflare, often an empty response, making it distinct from a generic 502.