Cloudflare tried to connect to your server and the connection was refused: nothing is listening on the port, or a firewall is turning Cloudflare away. The web server may be stopped, a security tool may have blocked Cloudflare’s addresses, or the SSL/TLS mode sends Cloudflare to a port the server does not serve.
Web server is down Error code 521
How 2 other clients word the same error
Browser tab
example.com | 521: Web server is down
curl -I
HTTP/2 521
| Error | Error 521: Web server is down |
| Usually fixed by | The site owner or host |
| Status | 521 — Cloudflare’s own code |
| Means | Your server refused Cloudflare’s connection |
| Ports | 443 for SSL/TLS Full and Full (strict), 80 for Flexible |
Check the site from outside
Enter the address: we load it from our network and show the status code, how long it took, and the error if it failed.
What it means
Cloudflare connects to your server on port 443 or 80, depending on the zone’s SSL/TLS mode. Error 521 means that connection was refused outright — the server answered “no” rather than staying silent (silence is 522).
Why it happens
- The web server (Apache, nginx, LiteSpeed) is stopped or has crashed.
- A firewall or security tool on the server refusing Cloudflare’s addresses — often one that took Cloudflare’s many requests for an attack.
- SSL/TLS set to Full or Full (strict) while the server serves no HTTPS on port 443, or to Flexible while nothing listens on port 80.
How to fix it
- Make sure the web server is running, and ask it directly whether it answers (the command below).
- Allow all of Cloudflare’s IP ranges (cloudflare.com/ips) in the firewall and any security plugin, and make sure they are not rate limited.
- Match the SSL/TLS mode to the server: Full and Full (strict) connect on port 443 and need HTTPS there — a Cloudflare Origin Certificate will do — while Flexible connects on port 80.
- If you cannot reach the server yourself, ask the host whether it is up and whether it blocks Cloudflare.
If you are visiting the site
- Nothing on your side causes it. Try again later; the site’s server is not accepting connections.
See it for yourself
curl -sv -o /dev/null https://example.com/ --resolve example.com:443:203.0.113.10
nc -vz 203.0.113.10 443
With the origin’s IP in place of 203.0.113.10: “Connection refused” means nothing is listening on the port, or a firewall is rejecting you as it rejects Cloudflare.
Sources
Error text and meaning checked on 25 September 2026 against these official sources: