Cloudflare Error 521: Web Server Is Down

Share
Ongoing All Updated November 13, 2026Based on 3 user reportsHow we research

Quick answer

Error 521 means your origin refused Cloudflare's connection. Check that the web server is running, then allowlist Cloudflare IP ranges in the origin firewall.

Most likely fix: Confirm the origin is up

How to fix it

Try these in order — the most common fix is first.

  1. 1. Confirm the origin is up

    1. Open the server directly by IP or via SSH and check the web server (nginx/Apache) is running
    2. Read the origin error log for crashes at the time of the error
    3. Restart the web server if it stopped
    Did this fix it?
  2. 2. Allowlist Cloudflare IP ranges

    1. Copy the ranges from cloudflare.com/ips
    2. Allow them in iptables, ufw, cloud security groups and any security plugin
    3. Remove rate limits that apply to those IPs
    Did this fix it?
  3. 3. Match the SSL mode to the port

    1. Open SSL/TLS > Overview in the dashboard
    2. Flexible connects on port 80, Full and Full (strict) on port 443
    3. Install a valid certificate or a free Cloudflare Origin CA certificate if using Full
    Did this fix it?

Symptoms

The page shows 'Error 521 Web server is down' with a Cloudflare Ray ID, while the site may load when Cloudflare is paused.

Why it happens

  • Origin web server is offline or crashed
  • Origin firewall or security plugin blocking Cloudflare IPs
  • Server not listening on port 80 (Flexible) or 443 (Full / Full strict)
  • Origin has no valid certificate under Full or Full (strict)

This guide also covers

  • cloudflare error 521
  • web server is down cloudflare
  • error 521 cloudflare fix

Still not working?

If Cloudflare keeps failing, you're not alone. See every Cloudflare problem users report or the alternatives people switch to.

Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.

Talk to us
Fixed it? Share this guide

Other Cloudflare errors

All 15 Cloudflare errors and fixes →