General

Cloudflare Error 521: Web Server Is Down

Updated November 2026 2 views 5 min read
Errors & Troubleshooting | Updated November 2026

Cloudflare Error 521: Web Server Is Down means Cloudflare could not open a connection to your origin server at all. Either the web server is genuinely stopped, or the CSF firewall on the server is blocking Cloudflare's IP ranges, which looks identical to a down server from Cloudflare's point of view. The fix is to confirm the web server is actually running, then whitelist Cloudflare's published IP ranges in the CSF firewall so those connections are allowed.

01. What Error 521 Means

Error 521 is returned when Cloudflare's attempt to establish a TCP connection to your origin is refused or dropped outright. Unlike a 522 timeout, there is no slow handshake to wait on. The connection is actively refused or silently blocked, so Cloudflare concludes the web server is down.

In practice there are two realities behind a 521. Either the web server process is not listening, or something between Cloudflare and the server, usually a firewall, is rejecting the connection. Both look the same to Cloudflare, so check the server state first and the firewall second.

02. Is the Server Actually Up

Confirm whether the site responds when Cloudflare is out of the picture.

  • Use our status checker at upordown.ultrawebhosting.com to see whether the site answers from outside.
  • In cPanel, confirm your account is active and the domain is listed under your account.
  • If you have shell access, confirm Apache is listening on ports 80 and 443.
curl -I --resolve <yourdomain>:443:<origin-ip> https://<yourdomain>/

If that direct request to the origin IP succeeds while visitors still get a 521 through Cloudflare, the server is up and the problem is a block in between. Move to the firewall section. For broader context on diagnosing Cloudflare errors, see the Troubleshooting Cloudflare Errors hub.

03. CSF Firewall Blocking Cloudflare IPs

This is the single most common cause on our servers. CSF (ConfigServer Security & Firewall) can block or rate-limit the Cloudflare edge IPs after repeated connections, or they may never have been whitelisted. When that happens, every Cloudflare connection is dropped and the site shows 521 even though Apache is healthy.

The fix is to allow Cloudflare's current published IP ranges. Cloudflare lists them at its official IP ranges page, and they must be added as both IPv4 and IPv6 entries.

  1. Get the current ranges - use Cloudflare's published IPv4 and IPv6 lists. Do not hand-copy an old list, as the ranges change.
  2. Add them to csf.allow - each range on its own line so CSF permits the source.
  3. Restart CSF - reload the firewall so the allow entries take effect.
# add each Cloudflare range to the allow list
csf -a <cloudflare-range>
# then restart the firewall
csf -r

For the correct Cloudflare configuration on our platform, including where the IP list lives and how the proxy should be set up, follow our CloudFlare for WordPress and Websites guide. If you are unsure whether your own IP has been caught by the firewall during testing, the Firewall Block - How to Unblock Your IP article explains how CSF blocks work and how to clear them.

Important

Cloudflare adds and retires IP ranges over time. Pull the ranges fresh from Cloudflare's official list rather than relying on a saved copy, or a future range will start getting blocked and the 521 returns.

04. Account Suspended

A suspended cPanel account also presents as a 521, because a suspended account stops serving traffic and Cloudflare cannot connect. Suspensions are usually billing-related or the result of a policy or abuse issue.

  • Check your billing area for a past-due invoice.
  • Look for a suspension notice emailed to the address on your account.
  • If you believe the suspension is in error, open a ticket to have it reviewed.

Still Seeing Error 521?

If the server is up and Cloudflare ranges are whitelisted but the 521 persists, open a ticket and include the Cloudflare Ray ID from the error page and the affected domain so we can trace the blocked connection in the firewall logs.

Open a Support Ticket

Frequently Asked Questions

What does Cloudflare Error 521 mean?

A 521 means Cloudflare could not open a connection to your origin server at all. The server refused the connection or nothing was listening on the web port. Common causes are the web server being stopped, the account or server being down, or a firewall blocking Cloudflare's IP ranges.

How do I fix a 521 Web Server Is Down error?

Confirm your hosting account and web server are running, then make sure your firewall allows Cloudflare's published IP ranges to reach ports 80 and 443. On UWH shared hosting the server is managed for you, so if the site loads directly on its origin IP but Cloudflare shows 521, the block is almost always a firewall or Cloudflare IP allowlist issue.

Why does my site show 521 only through Cloudflare?

Because Cloudflare cannot reach the origin even though the server itself is up. That points to a firewall or security rule dropping Cloudflare's connections, an incorrect origin IP in your DNS, or the origin listening on a non-standard port Cloudflare is not configured to use.

Does a 521 mean my server is actually offline?

Not necessarily. It means Cloudflare's connection was refused or unanswered. The server can be fully up while a firewall rule, a stopped web service, or a wrong origin IP makes it unreachable from Cloudflare specifically.

Quick Recap

  1. 521 means no connection - Cloudflare was refused or dropped, not timed out.
  2. Confirm the server is up - test with upordown.ultrawebhosting.com and a direct curl.
  3. Whitelist Cloudflare in CSF - add the current IP ranges to csf.allow and restart CSF.
  4. Keep the ranges current - pull them fresh from Cloudflare, they change over time.
  5. Rule out suspension - a billing or policy suspension looks the same as a down server.

Troubleshooting Cloudflare errors · Last updated November 2026 · Browse all Errors articles

Share: X in Reddit f Email
  • 0 Users Found This Useful

Was this answer helpful?

Related Articles

How to Create a Support Ticket

General | Updated March 2026 The fastest way to get help with your hosting account is by...

PHP RCE Vulnerabilities CVE-2026-109618 and CVE-2026-109619 - Patch Status

Server Security | Updated October 2026 Ultra Web Hosting servers are fully patched against...

Error 404 - File Not Found

Errors & Troubleshooting | Updated March 2026 A 404 error means the server can't find the...

Lightweight Browser for Older and Slower Computers

General | Updated November 2026 If your computer is older or running on limited hardware,...

Why a TLS Checker May Report Your Mail Server Does Not Support TLS

Email and Webmail | Updated October 2026 If an online SMTP or email diagnostic tool warns...



Save 30% on web hosting - Use coupon code Hosting30