Skip to content

5xx Server error · unofficial (Cloudflare)

521 Web Server Is Down

Cloudflare couldn't connect to the origin server: it refused the connection.

What 521 means

The site's own server is offline, or its firewall blocks Cloudflare.

Common causes

  • The origin web server is stopped.
  • A firewall or security plugin blocking Cloudflare's IPs.

How to fix it

If you're calling an API

  • Wait and retry; the site's server is down.

If you run the server

  • Start the web server and allow Cloudflare's IP ranges in the firewall.

Should you retry?

Later.

Example response

HTTP
HTTP/1.1 521 Web Server Is Down
Content-Type: application/problem+json

{
  "type": "about:blank",
  "title": "Web Server Is Down",
  "status": 521,
  "detail": "Cloudflare couldn't connect to the origin server: it refused the connection."
}

Defined in: Cloudflare (non-standard). 521 is a server error: the problem is on the server's side.

Debugging an API call? Convert your request with the cURL converter, check the response with the JSON formatter, or see whether the API is down on its status page.

Often confused with

HTTP 521 FAQ

What does HTTP 521 mean?

521 Web Server Is Down: Cloudflare couldn't connect to the origin server: it refused the connection. The site's own server is offline, or its firewall blocks Cloudflare.

Is 521 a client or server error?

It's a server error (5xx): the server failed to handle a valid request, so the fix is usually on the server's side.

How do I fix a 521 error?

Wait and retry; the site's server is down.

Should I retry after a 521?

Later.

Other 5xx status codes

All HTTP status codes