5xx Server error Non-standard · used by Cloudflare
HTTP 521 Web Server Is Down
A Cloudflare code: Cloudflare tried to connect to the origin server and the connection was refused. Either the web server isn’t running, or a firewall on the origin rejects Cloudflare’s addresses.
Documented in Cloudflare: 5xx errors(opens in a new tab)
//_01 Uptime checks
Is 521 up or down for a monitor?
Uptimecheck HTTP monitor
Default settings
Down. It is outside the default 200–399 range, so a monitor reports an outage once a second check confirms it. If 521 is the answer you expect from that URL, add it to the monitor’s expected status codes.
Is it down? checker
Free, at /is-it-down/
Down. A 5xx means the server, or something in front of it, failed to answer.
//_02 Causes and fixes
Why you see 521 and what to do
Typical causes
- The web server (nginx, Apache) is stopped or crashed.
- A firewall or security plugin on the origin blocking Cloudflare’s IP ranges.
If you run the site
- Check that the web server is running and listening on the right ports.
- Allow all of Cloudflare’s IP ranges in the origin’s firewall.
If you’re a visitor
- Try again later; the site’s server is down.
Know the moment your site stops answering as it should
An Uptimecheck monitor requests your page as often as every 30 seconds on Business, checks the status code against the ones you expect, confirms a failure with a second check and then alerts you.
14-day free trial · Then free on 20 monitors · No credit card
Questions
What does HTTP 521 mean?
A Cloudflare code: Cloudflare tried to connect to the origin server and the connection was refused. Either the web server isn’t running, or a firewall on the origin rejects Cloudflare’s addresses.
Does an uptime monitor count 521 as down?
Down. It is outside the default 200–399 range, so a monitor reports an outage once a second check confirms it. If 521 is the answer you expect from that URL, add it to the monitor’s expected status codes.
Related status codes
All status codes- 522 Connection Timed Out Cloudflare couldn’t connect to the origin server in time.
- 523 Origin Is Unreachable Cloudflare can’t reach the origin server at all.
- 502 Bad Gateway A proxy got an invalid response from the server behind it.
Hear it from us, not your customers.
Click around the live demo without an account, or start your trial and add your first monitor.
14-day free trial · Then free on 20 monitors · No credit card