Cloudflare Error 520 WordPress: How to Troubleshoot and Fix It

When visitors try to access your content, they may see the message “Error 520: The web server returned an unknown error.”

When your website visitors see the 520 error in their browsers, it means that Cloudflare is sending a message because your server returned an empty, unknown, or unexpected response.

This is a general response from Cloudflare indicating that their website did something unexpected, resulting in an empty response. This can happen for a variety of reasons, from web server configuration to invalid HTTP responses.

Cloudflare Error 520

What Causes Cloudflare Error 520?

Cloudflare Error 520 occurs when a web server receives an invalid or misinterpreted request, resulting in an empty response. As a result, the visited website is loaded with the message “The web server is returning an unknown error”.

The issues of this error code 520 include system PC freezing, crashing, and possible virus infection. This 520 error also indicates a problem with the origin server, possibly a request timeout error.

How to Fix Cloudflare Error 520 Code Problem Issue

Let’s Start To Fix it

Remove unwanted Extensions from your web browser.

  • Go to the start menu
  • Search or go to your Browser
  • Click on it and opens it there
  • After that, click on the three dots signs there
  • & click on ‘More Tools‘ there
  • Now, click on the ‘Extensions‘ option there
  • Click on the extension which you do not want.
  • Click on the Trash sign there to remove it from the browser
  • After removing, close the tab
  • That’s it, done

Make sure Cloudflare DNS records are correct

DNS records play a vital role in the functionality of a website, supplying information such as what IP address corresponds to a particular domain. Improper DNS entry can result in an empty or unexpected response by the domain name server.

See your organization s DNS website editor to find your organization s domain name system IP address. Then, consult with your Cloudflare dashboard to reconfirm your organization’s domain name system IP address.

Track Headers and Cookies to check their status

Cloudflare’s overall limit of request headers is 32 KB, with a maximum entry of 16 KB for each header. If the total exceeds the limit, the server will issue a 520 response. Examine your website’s headers using HAR (HTTP Archive).

  • Right-click the web page where the error 520 is displayed and click on Inspect to open the developer tools.
  • Click on the Network tab.
  • Click on the small round button if it’s gray.
  • Check the Preserve log box.

Refresh the page and reopen the network tab.

  • Right-click anywhere on the developer tools window.
  • Select Save all as HAR with Content.

Disable Cloudflare

Before you troubleshoot, you need to disable Cloudflare. By doing this, you can rule out Cloudflare as a possible cause of the problem.

Start by logging into Cloudflare. Then, find your site on the list and click on it.
Next, click on the DNS tab, then on the orange cloud under the Proxy status section in the table. You’ll know Cloudflare was disabled because the cloud will have turned gray.

Cloudflare Support can help you

Ask for additional assistance by contacting Cloudflare support by submitting a ticket. Typically, you will need to provide the URL, Cloudflare Ray ID, and HAR files of Cloudflare being enabled and disabled to Cloudflare support.

Change Windows Proxy and Firewall Settings on your Windows PC

  • Go to the start menu
  • Search or go to the PC settings there
  • Click on the ‘Show advanced settings option
  • Now, click on the ‘Network Settings‘ there
  • & click on the ‘Change Proxy Settings‘ option there
  • Now, a Pop-up will open there &
  • Go to the Connections tab there
  • Click on their ‘LAN Settings‘ there &
  • Tick the “Use a Proxy Server for this connection.”
  • After completing, close the tab
  • That’s it, done

To troubleshoot and fix the Cloudflare Error 520 on your WordPress website

  1. Check Cloudflare Status: Before making any changes, it’s a good idea to check Cloudflare’s status page to see if they are experiencing any widespread issues that might be causing the error.
  2. Check Web Server Logs: Look into your web server logs to identify any errors or issues. Pay attention to the logs around the time Error 520 occurred. This might give you insights into what’s causing the issue on the server side.
  3. Review Firewall Rules: If you’re using a firewall on your web server, make sure it’s not blocking incoming connections from Cloudflare’s IP ranges. Adjust your firewall rules if necessary.
  4. Check Hosting Provider: Sometimes the issue can be on your hosting provider’s end. Reach out to them to see if there are any server-related problems causing Error 520.
  5. Check Plugins and Themes: Faulty or incompatible plugins and themes can also cause conflicts leading to this error. Temporarily disable all plugins and switch to a default WordPress theme to see if the issue persists. If the error goes away, you can reactivate plugins and themes one by one to identify the culprit.
  6. Increase Server Resources: If your server is running out of resources (CPU, memory), it might not be able to handle incoming requests properly. Consider upgrading your hosting plan or optimizing your website’s code.
  7. Check Cloudflare Settings: Review your Cloudflare settings. Make sure your DNS records are correctly configured and that Cloudflare is set to the appropriate security level. Also, check if you have any Page Rules that might be affecting the behavior.
  8. Purge Cache: In Cloudflare’s dashboard, you can purge the cache for your website. Sometimes cached resources can cause conflicts. After purging the cache, see if the error persists.
  9. Temporary Bypass Cloudflare: To confirm if the issue is related to Cloudflare, temporarily bypass it by changing your DNS settings to point directly to your origin server’s IP address. If the error goes away, it’s likely a Cloudflare-related issue.
  10. Contact Cloudflare Support: If you’ve tried all the steps and the issue persists, consider reaching out to Cloudflare’s support. They can provide further assistance and insights into the specific issue affecting your website.

Conclusion

if you experience an Error 520 when trying to activate Cloudflare on your WordPress site, there are a few steps that you can take to resolve the issue. First, make sure that Cloudflare is installed and activated on your server. If that fails, try disabling any caching plugins that might be interfering with Cloudflare. Finally, if all else fails, contact Cloudflare support for assistance.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.