Skip to main content
All CollectionsDomains, Web Servers, and BeyondWeb Servers
How to Fix Cloudflare’s “Error 520: Web Server Is Returning an Unknown Error”
How to Fix Cloudflare’s “Error 520: Web Server Is Returning an Unknown Error”
Rapyd Team avatar
Written by Rapyd Team
Updated over a week ago

Cloudflare's "Error 520: Web Server Is Returning an Unknown Error" is an issue many website owners dread encountering. This error indicates that the Cloudflare CDN is unable to establish a connection to the original web server, even though there's no precise cause pinpointed. Resolving it requires a methodical approach. This article guides you through potential fixes to ensure that your website returns to its optimal functioning state.

Cloudflare is a prominent content delivery network (CDN) and internet security provider. When using Cloudflare, an "Error 520" can disrupt the smooth user experience. This is a general error message which essentially states that Cloudflare failed to receive a timely response from your server. While it might seem daunting, especially to non-tech-savvy individuals, with a systematic approach, the error can be resolved efficiently. We will delve deep into the reasons behind this error, providing potential solutions and suggesting preventive measures to avoid future occurrences.

Understanding Cloudflare Error 520:

When a visitor tries to access a website using Cloudflare, the CDN attempts to connect to the original web server. If Cloudflare fails to establish this connection or doesn't get a response, it displays "Error 520." Essentially, it's Cloudflare's way of saying, "I tried reaching the website's server, but something went wrong."

Causes Behind the Error:

Various factors can lead to this error. Some common ones include server-side issues, such as server overload, network issues between Cloudflare and the web server, or even server software misconfigurations. Sometimes, specific firewall rules or security plugins might block Cloudflare's requests, mistakenly identifying them as potential threats.

Step-by-Step Solutions to Address the Error:

  1. Server-side Examination: Begin by checking the server for any overload or crashes. If everything seems fine, look at the server logs, especially during the times the error occurred. This might give you hints on blocked Cloudflare requests.

  2. Check Firewall Settings: Ensure that no firewall rules are blocking Cloudflare's IP addresses. If any are found, whitelist them immediately.

  3. Inspect Rate Limiting Rules: Some servers have rate limiting in place, which can occasionally block Cloudflare. Adjust these settings if they seem too restrictive.

  4. Review Third-party Services: If you're using security plugins or third-party services, they might inadvertently block Cloudflare. Temporarily disable them to check if they're the cause.

  5. Contact Your Hosting Provider: If the steps above don't work, reach out to your hosting provider. They might have insights or might be aware of broader issues affecting multiple clients.

Preventive Measures for the Future:

To avoid future occurrences of this error, maintain regular server health checks and monitor server logs for any unusual activity. Regularly update all software, plugins, and themes. Keep a close eye on firewall settings and ensure Cloudflare IPs are always whitelisted. Lastly, stay informed about updates from both Cloudflare and your hosting provider, as they can alert you to potential issues or changes that might affect your site.


While Cloudflare's "Error 520" can initially seem perplexing, understanding its causes and potential solutions can simplify the troubleshooting process. Regular maintenance, combined with proactive monitoring, can significantly reduce the chances of facing this error again. If you ever encounter it on your Rapyd-hosted website, remember: with a methodical approach, you're more than equipped to handle it!

Did this answer your question?