Cloudflare 521 (Web Server Is Down)
HTTP 521 is a Cloudflare-specific status, not an IANA/RFC standard. Cloudflare returns 521 when it cannot establish a TCP connection to the origin — the origin actively refused the connection or is down. A frequent cause is the origin firewall blocking Cloudflare's IP ranges, or the web server process being stopped. It points squarely at origin reachability.
What 521 means (Cloudflare-specific)
521 is part of Cloudflare's 52x error range and is not an IANA-registered status. Cloudflare documents it as 'Web server is down': the edge tried to open a connection to the origin and the origin refused it, or the server is not running.
Unlike 520, which is about an unexpected response, 521 is about not being able to connect at all. The TCP handshake to the origin did not succeed.
Common causes and fixes
The most common cause is the origin firewall or security group blocking Cloudflare's connecting IP ranges, so the origin refuses the edge. Another is the origin web server process being stopped or crashed, so nothing is listening on the expected port.
The fix is to ensure the origin server is up and that its firewall permits Cloudflare's connections. Cloudflare publishes its IP ranges so operators can allow them. Verifying the web server is listening and reachable on the configured port resolves most 521s.
- Cloudflare-specific, not an IANA/RFC status
- Means the origin refused the connection or is down
- Common cause: firewall blocking Cloudflare, or stopped server
How it appears in analytics and logs
A 521 means Cloudflare's connection to the origin was refused or the origin is down. The request never got a response from your server. To crawlers it is a 5xx-style outage, so affected URLs are not indexed while it lasts.
Diagnostic use case
Diagnose 521 by confirming the origin web server is running and that its firewall allows Cloudflare's connections, restoring edge-to-origin reachability.
What WebmasterID can help detect
WebmasterID surfaces the status codes crawlers receive at the edge, helping you detect Cloudflare 521 outages where the origin became unreachable.
Common mistakes
- Blocking Cloudflare's connecting IP ranges at the origin firewall.
- Assuming 521 is a standard HTTP code — it is Cloudflare-specific.
- Restarting Cloudflare-side settings when the fix is to bring the origin back up.
Privacy and accuracy notes
A 521 is an edge-to-origin connectivity status with no personal data. WebmasterID records the status without linking it to a visitor identity.
Related pages
- Cloudflare 520 (Unknown Error)
HTTP 520 is a Cloudflare-specific status code, not part of any IANA/RFC standard. Cloudflare returns 520 when the origin server returns an empty, unknown, or otherwise unexpected response that Cloudflare cannot interpret. It is a catch-all for connection issues between Cloudflare and the origin, and it points to the origin or the connection, not to Cloudflare itself.
- Cloudflare 522 (Connection Timed Out)
HTTP 522 is a Cloudflare-specific status, not part of the IANA/RFC standards. Cloudflare returns 522 when the TCP connection to the origin timed out before it could be established — Cloudflare reached out but the origin did not complete the handshake in time. It usually reflects an overloaded origin, network/routing problems, or a firewall silently dropping packets.
- HTTP 503 Service Unavailable for maintenance
503 Service Unavailable means the server is temporarily unable to handle the request, usually due to maintenance or overload. It is the correct, index-protecting status for planned downtime: with a Retry-After header, compliant crawlers understand the outage is temporary and come back later.
- Website observability
Detect edge-to-origin outages crawlers experience, recorded server-side.
Sources and verification notes
- Cloudflare — Troubleshooting Cloudflare 5XX errors (521)Cloudflare-specific code; not in the IANA HTTP status registry.
Last reviewed 2026-06-24. Facts are checked against primary/official sources where available; uncertain specifics are marked “Data not yet verified” rather than guessed.