HTTP 521 Web Server Is Down vs 522 Connection Timed Out
Both HTTP 521 (Web Server Is Down) and 522 (Connection Timed Out) belong to the 5xx Server Error category. 521 indicates that cloudflare-specific. The origin server refused the connection. Meanwhile, 522 means that cloudflare-specific. TCP connection to the origin server timed out.
Description
Cloudflare-specific. The origin server refused the connection.
When You See It
When Cloudflare can't establish a TCP connection to the origin server.
How to Fix
Check that the origin server is running and the firewall allows Cloudflare IPs.
Description
Cloudflare-specific. TCP connection to the origin server timed out.
When You See It
When the origin server is overloaded or network issues prevent connection.
How to Fix
Check origin server health. Verify firewall rules. Check for network congestion.
Key Differences
HTTP 521: Cloudflare-specific. The origin server refused the connection.
HTTP 522: Cloudflare-specific. TCP connection to the origin server timed out.
You encounter 521 when when Cloudflare can't establish a TCP connection to the origin server.
You encounter 522 when when the origin server is overloaded or network issues prevent connection.
When to Use Which
For 521 (Web Server Is Down): Check that the origin server is running and the firewall allows Cloudflare IPs. For 522 (Connection Timed Out): Check origin server health. Verify firewall rules. Check for network congestion.