Error 521: Web Server Is Down
Error 521 is the Cloudflare message “web server is down”. It appears when the origin web server refuses the connection from Cloudflare. This page explains what it means, what usually causes it and what you can do about it, as a visitor or as the owner of the site.
- Error code
- 521
- Cloudflare message
- Web server is down
- HTTP status
- 521
- Who can fix it
- The site owner
- Official reference
- Cloudflare documentation for error 521
What error 521 means
Cloudflare tried to open a connection, and the server actively rejected it. This usually means the web server program is not running, or something on the server is blocking Cloudflare.
Cloudflare sits between the visitor and the web server of the site, which is called the origin. When something fails on that path, Cloudflare shows its own error page instead of the site. So error 521 comes from Cloudflare's network, not from your browser or your device.
What causes error 521
- The web server application is stopped or has crashed.
- A firewall or security tool on the server blocks Cloudflare IP addresses.
- The server is not listening on the port the SSL/TLS mode needs: port 80 for Flexible, port 443 for Full and Full (strict).
More than one of these can be true at the same time. Therefore start with the most recent change, because an error that appears right after a deployment, a DNS edit or a new firewall rule usually comes from that change.
How to fix error 521 as a visitor
You cannot fix this from your side, so try again later or tell the site owner.
In any case, reload the page once and try again a few minutes later. If the error stays, tell the site owner and include the Ray ID shown at the bottom of the error page, because it lets them find your exact request.
How to fix error 521 as the site owner
- Make sure the web server is running and answers on the server itself.
- Allow all Cloudflare IP ranges in the firewall and remove any rate limit on them.
- Check that the server listens on port 443 if the SSL/TLS mode is Full or Full (strict).
- Read the web server error logs to find crashes or outages.
If none of these steps helps, collect the Ray ID, the time of the error and the affected URL. Then send them to your hosting provider first, since many causes sit on the server side. Cloudflare Support only works with the owner of the domain.
Where to find the details
Every Cloudflare error page shows a Ray ID, which is a unique identifier for that single request. In the Cloudflare dashboard, the site owner can search for it in the security events or in the logs. As a result, a vague report turns into one exact request with its time, location and rule.
For that reason, a screenshot of the whole error page is the most useful thing a visitor can send. It contains the code, the Ray ID, the time and the Cloudflare location that answered.
On the server side, compare the time of the error with the web server and firewall logs. Also check any load balancer, proxy or security plugin that sits between Cloudflare and the application, because the cause is often there.
How error 521 differs from other Cloudflare errors
Cloudflare uses two families of codes. Codes from 520 to 530 mean that Cloudflare reached out to the origin server and something went wrong on the way or in the answer. Codes from 1000 upwards mean that Cloudflare itself stopped the request, usually because of a DNS setting or a security rule.
Standard codes such as 500, 502, 503 and 504 are different again, because they can also come straight from the origin server. If the page carries Cloudflare branding and a Ray ID, Cloudflare produced it. Otherwise the origin did.
The related codes below are the ones most often confused with error 521, so check them if the description here does not match what you see.
Does error 521 affect search rankings?
A short outage rarely does. Search engines retry a page that answers with an error, and they keep the old copy in the meantime.
However, an error that lasts for days is a different matter. Crawlers slow down, and pages can drop out of the index after repeated failures. Therefore fix a lasting error quickly, and check the crawl report in your search console afterwards.
Blocks aimed at one visitor, such as a rate limit or a firewall rule, do not change rankings unless they also catch the crawlers. So make sure that your security rules allow verified search bots.
When to ask for help
Many causes take a few minutes to fix once you know where to look. Others need access to the server, the firewall and the Cloudflare account at the same time, which is hard when different people manage each part.
If the error keeps coming back, the cause is often capacity, a fragile server setup or a rule that is too broad. In that case a review of the whole path, from DNS to the application, saves more time than another quick patch.
The official description of this error is in the Cloudflare documentation, which lists every known cause in technical detail. This site is independent and is not affiliated with Cloudflare.
Does your site keep showing Cloudflare errors?
We build fast, secure websites hosted on Cloudflare. Tell us what you see, and we will quote for finding and fixing the cause.
Talk to us about your siteFrequently Asked Questions
Is error 521 a problem with my computer or internet connection?
Usually not. The error page is produced by Cloudflare after your request has already reached its network. So your connection works, and the problem lies with the site, its server or its security rules.
Who has to fix error 521?
The owner of the website or their hosting provider. A visitor cannot fix it, but a report with the Ray ID helps the owner find the cause faster.
How long does error 521 last?
It lasts until the cause is removed. Some cases clear in seconds, for example when a server restarts, while a wrong setting stays until someone corrects it.
Will clearing my cache or cookies fix error 521?
Rarely. The error is created on Cloudflare's side for each request, so old browser data is seldom the cause. However, a hard reload is quick and harmless, so it is worth one try.
What is the Ray ID on the error 521 page?
It is a unique identifier that Cloudflare gives to every request. The site owner can search for it in the Cloudflare dashboard to see exactly what happened to your request.
More questions about error 521
Is Cloudflare down when I see this error?
Almost never. The error page itself is served by Cloudflare, which shows that its network is answering. Still, you can check the Cloudflare status page if many unrelated sites fail at once.
Can Cloudflare Support fix it for me?
Only if you own the domain. Cloudflare Support works with the account owner and cannot change another customer's settings. Visitors should contact the website instead.
Does a VPN or proxy cause this error?
It can for errors that block a visitor, because many sites restrict addresses used by VPNs and data centres. For errors between Cloudflare and the origin server, a VPN makes no difference.
Which HTTP status code does it return?
Cloudflare returns this error with HTTP status 521. Monitoring tools and logs often record only that status, so search for it when you look for this error.
Can I show my own page instead of the Cloudflare error page?
Yes, if you own the site. Cloudflare lets the owner replace its default error pages with custom ones on plans that include that feature. The cause of the error stays the same, though.