(4 votes, average: 5.00 out of 5)
Loading...
A visitor enthusiastically hops into your site, searching for some information. When they click on it, all they see is this message, “Error 520: Web Server Is Returning an Unknown Error”.
They try again and the same thing appears. Feeling disappointed, they left your site and visited your competitor’s site.
There, you lost a potential lead!
Not only this but you may also realize you aren’t able to log in to the site dashboard. Thus, resolving Error 520 is important for continuous access and provides the best user experience.
In this article, we’ll understand what Error 520 is, its possible causes, and how to fix Error 520.
Let’s dive right in!
“Error 520: web server is returning an unknown error” implies that Cloudflare is unable to connect to your original web server. Instead, the server returns an unknown, unexpected, or empty response to Cloudflare.
Thus, if you encounter the above message when using Cloudflare, know that the connection is not established. This also means the server can’t process the user request, hinting at the website’s unavailability.
You may receive Error 520 due to a number of reasons:
Follow the below steps to fix “Error 520: web server is returning an unknown error”:
Sometimes, the error could be temporary. Issues like high traffic volumes or server overloading can cause the server or network to deny or delay requests.
When this happens, it will start fixing the issue or scale up resources automatically to accommodate the load. Thus, it will require some time to process the requests.
So, wait for a while and refresh the web page to check if the problem is resolved. If not, there are other methods you can try.
If you are using Cloudflare’s reverse proxy and getting Error 520, try disabling Cloudflare. Follow the below steps to do it:
Error logs provide crucial information, which will help you resolve the issue faster. It includes data, such as:
However, the process of creating error logs can differ based on the hosting service. For cPanel users, here’s how you can check error logs:
If the overall request header’s size is larger than 32 kb, it will show Error 520. Also, too many cookies increases the header size. Thus, it’s essential to optimize cookies and headers, keeping it under 16 kb per header and 32 kb overall, so that user requests can be processed without hassles. Steps to do it are as follows:
Incorrect DNS records can cause Error 520, so check the records and correct them. Here’s how to do it:
.htaccess or hypertext access files are configuration files for Apache-based websites. Sometimes, if this file gets corrupted or has some other flaws in it, the web server can’t process user requests.
So, if your site is hosted on Apache Web server, disable the .htaccess file to resolve the issue. Also, ensure your firewall or .htaccess file don’t have settings to block Cloudflare IP addresses. To disable the file, follow the steps:
cURL or client URL is a command that you can use to send HTTPS/ HTTP requests and fix HTTP errors. So, run the cURL in the command terminal by following these steps:
For Windows:
For macOS:
Thus will trigger a request to the web server and obtain a complete response.
cURL format: curl -I http://xyz.com
Running this command will help you understand an error response and a successful response. Thus, you can check whether the server is properly configured.
Sometimes, Error 520 can occur due to PHP code crashing or malfunctioning. So, consider restarting PHP. It might differ with the type of server and software the server runs. To restart PHP:
If you have tried everything and still Error 520 keeps showing, reach out to Cloudflare’s support team.
Error-520 is a serious issue that you must resolve quickly if you want to have seamless access to your site dashboard and deliver the best user experience. So, if you face Error 520, resolve it quickly by following various ways as explained above.
Protect your Website’s Sensitive Data with Trusted SSL/TLS Certificates!
~ Starts at just $3.99/yr