5205xx Server ErrorCritical

HTTP 520 Web Server Returns Unknown Error

Defined in Cloudflare

What Does HTTP 520 Mean?

Cloudflare received an empty, unknown, or unexpected response from the origin server.

Common Causes

  1. 1Origin server crashing or returning empty response
  2. 2Origin server closing connection unexpectedly
  3. 3Response headers exceeding Cloudflare limits
  4. 4PHP or application errors producing empty output
  5. 5Origin firewall blocking Cloudflare IPs

Impact

  • Website completely unavailable
  • All pages return Cloudflare error

Developer Fix

For web developers and application engineers

  1. 1Check origin server error logs for crashes
  2. 2Verify application is returning valid HTTP responses
  3. 3Ensure response headers are within size limits
  4. 4Test origin directly bypassing Cloudflare

Server Admin Fix

For system administrators and DevOps engineers

  1. 1Whitelist Cloudflare IP ranges in origin firewall
  2. 2Restart origin web server
  3. 3Check origin server resource usage
  4. 4Review and fix application errors causing empty responses

Frequently Asked Questions

What makes 520 different from 502?
520 is Cloudflare-specific. While 502 means the origin sent an invalid response, 520 means Cloudflare got an empty, incomplete, or completely unexpected response from the origin.
How do I debug a 520 error?
Check origin server logs, test the origin directly (bypassing Cloudflare), ensure Cloudflare IPs are whitelisted, and verify the application isn't crashing or returning empty responses.

Related HTTP Status Codes

About the Author

Web Infrastructure Team

Verified against official RFC specifications and real-world server configurations. HTTP status code behavior confirmed across Apache, Nginx, and Cloudflare.