HTTP status code · Cloudflare documentation (5xx errors)
521 Web Server Is Down (Cloudflare)
521 is a Cloudflare error: Cloudflare couldn't connect to the site's origin server because the origin refused the connection.
What 521 means
Not a standard HTTP code. Cloudflare reached the origin's IP address, but the connection was refused: nothing is listening, or a firewall rejected Cloudflare's IPs. The problem is the origin server, not Cloudflare.
Common causes
- The web server (Nginx, Apache, the app) is stopped.
- A firewall or security tool blocking Cloudflare's IP ranges.
- The origin listening on a different port than Cloudflare connects to.
How to fix 521
- Start the web server and confirm it listens on 80/443.
- Allow Cloudflare's IP ranges in the firewall.
- Check the DNS record in Cloudflare points at the right origin IP.
How Uptenna treats 521
With the default expected status (200-399), a 521 counts as a failed check. Two failures in a row open an incident, and the alert says Got HTTP 521 (expected 2xx or 3xx). The first successful check resolves it and sends a recovery.
See Monitors for expected status codes, keywords and timeouts.
Frequently asked questions
What does HTTP 521 mean?
521 is a Cloudflare error: Cloudflare couldn't connect to the site's origin server because the origin refused the connection.
Is 521 an error?
Yes, 521 is a server error: the problem is on the server's side (or something between the client and the server).
Does an uptime monitor treat 521 as down?
By default, yes: Uptenna counts anything outside 200-399 as a failed check and opens an incident after two failures in a row. You can change the expected status per monitor.
Related status codes
Find out the moment your site returns 521
Uptime checks, cron job heartbeats and a public status page, with an alert the moment something breaks.
- No card required
- 14-day Pro trial
- Free plan after
- Monitors
- Free: 5Pro: 50
- Check every
- Free: 5 minPro: 1 min
- Alerts
- Free: EmailPro: 5 channels
- Status pages
- Free: 1Pro: 5
- SSL expiry alerts
- Free: Pro: