South Africa - cloudflare Error 521: Web server is down

I’m having a weird problem with all of our sites where Cloudflare is showing a 421 error even though the webserver is responding just fine. I have double-checked with the docs and ran the following command from my remote machine and I see the response that I am expecting. However, when visiting the website directly I get the 521 error, sometimes it will work for a few minutes and then returns the 421 error page

The firewall is set to whitelist all traffic from Cloudflare’s network already.

I am really stuck and out of ideas. Any help is appreciated.

Hi @account5,

Here is some info on the 521 error:

A 521 error happens when Cloudflare is unable to make a TCP connection to your origin server. Review the suggestions in this Community Tip for Quick Fix Ideas.

Are you able to check the server logs which may help you to track down the issue? Also, please have a look at the other suggestions in the article linked above.

Hi @domjh,

I was able to follow every suggested solution in the article link and i’m still having the issues.

The server runs well and Cloudflares IPs are not being blocked.
There is nothing much in the server log to explain why all the sites on the server are showing the 521 error.

Thanks for helping! I really appreciate

Are you able to share the domain name in question so we can check the issue?

This would definitely suggest that the issue is there on the server… If you are not self-hosted, are you able to contact your hosting provider for assistance?

Hi @domjh its a self managed server, unfortunately the hosting provider cannot help

Ok, can you get in the queue with support, send them info about the issue, example RayIDs of the connections etc. and see if they can pinpoint the issue? Please share the ticket number here so the mods can keep an eye.

To contact Cloudflare Customer Support, login & go to and select get more help. Please give Support the complete details and link to your Community post. Here’s a bit of background on Cloudflare Support for reference:


please do update us when u find a solution. I would love to know the reason.

@user3011 @domjh I figured that

  1. our IPs where being blocked internally within the server (Windows Server)
  2. As soon as I created a firewall rule to Allow All IPs (Inbound and Outbound) - of course this is a terrible practice. the sites worked again!
  3. We were using a 2008 windows server that was old and expensive - so we’re throwing it away and got a new windows server 2016! man it felt so good that I had to pop a beer ( and going out tonight too )

99% of the time your infrastructure is rubbish - so upgrade

A bit of shout out - I don’t work here but a great window self-managed server can be purchased from

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.