GET 10% OFF on all Annual Plans. Use Code - FETCH2024

520 Status Code – What Is It & How to Avoid It?

520 Error what is it and how to avoid it

520 status code typically indicates an unclear error response from a server, often associated with Cloudflare. This error occurs when the server receives an unexpected request from your end, which could be due to various technical issues on the site. It can also happen if your web scraping requests lack certain data expected by the website.

To avoid this, ensure your requests include all necessary headers such as CORS, Referrer, and Authorization. This is crucial to making your web scraping activities look more like regular user behavior and less like automated access, which can trigger security protocols like those used by Cloudflare.

If your requests are correct and the server isn’t the problem but you still see the 520 error, it may be because the server thinks you are using a bot. To fix this, try using an undetectable ChromeDriver together with a Web Scraping API like Scrapingdog

Additional Resources