520 Web Server Returned an Unknown Error — Causes & Fix
HTTP 520 (Web Server Returned an Unknown Error) means Cloudflare received an empty, unknown, or unexpected response from the origin server.
- Applies to
- Any website or web server (HTTP standard)
- Time to fix
- 15 minutes – 2 hours
What it means
Causes include an origin crash, an origin returning malformed/empty responses, connection resets, or headers that are too large. This is a Cloudflare-specific status code (not part of the HTTP standard). Cloudflare returns it when it sits in front of a site and has a problem reaching or getting a valid response from the origin (your) server — so the fix is almost always at the origin, not with the visitor.
Symptoms
- Cloudflare "Error 520" page
- Site behind Cloudflare intermittently fails
How to fix it
- 1
Check the origin server
1. As the site operator: check the origin's health and error logs for crashes/resets.
- 2
Review headers/limits
1. Look for oversized response headers or misbehaving apps at the origin; restart/repair the service.
Frequently asked questions
Is Error 520 Cloudflare's fault?
Usually not — 520 means Cloudflare got an unexpected/empty reply from your origin server. The fix is at the origin, not with the visitor.
Last updated July 20, 2026
Guidance only — always consult a qualified professional or the official service manual before carrying out repairs.