5215xx Server ErrorCritical

HTTP 521 Web Server Is Down

Defined in Cloudflare

What Does HTTP 521 Mean?

The origin web server refused or is not responding to Cloudflare's connection attempt.

Common Causes

  1. 1Origin web server is stopped or crashed
  2. 2Origin server is not listening on the expected port
  3. 3Origin firewall blocking Cloudflare IP addresses
  4. 4Origin server overloaded and refusing connections

Impact

  • Website completely unavailable
  • All pages return Cloudflare error

Developer Fix

For web developers and application engineers

  1. 1Verify origin server is running and accessible
  2. 2Check that the server listens on ports 80/443
  3. 3Test connectivity from outside the origin network

Server Admin Fix

For system administrators and DevOps engineers

  1. 1Start or restart the origin web server
  2. 2Whitelist all Cloudflare IP ranges in firewall
  3. 3Verify server is listening on correct ports
  4. 4Check for resource exhaustion preventing connections

Frequently Asked Questions

How do I fix a 521 error?
1. Check that your web server (nginx, Apache, etc.) is running. 2. Verify it's listening on ports 80 and/or 443. 3. Whitelist Cloudflare IPs in your firewall. 4. Test direct access to your origin.
Why does 521 happen if my server is running?
Your server may be running but not accessible to Cloudflare. Common causes: firewall blocking Cloudflare IPs, server listening on wrong interface (localhost only), or server at max connections.

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.