     [Answers](https://scrapfly.io/blog)   /  [blocking](https://scrapfly.io/blog/tag/blocking)   /  [Web scraping - what is HTTP 520 status code?](https://scrapfly.io/blog/answers/520-status-code)   # Web scraping - what is HTTP 520 status code?

 by [Bernardas Alisauskas](https://scrapfly.io/blog/author/bernardas) Dec 16, 2022 1 min read [\#blocking](https://scrapfly.io/blog/tag/blocking) 

 [  ](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2F520-status-code "Share on LinkedIn")    

 

 

Response status code 520 generally means the **server failed to generate a valid response** (Often related to Cloudflare). This could be caused by technical issues however in web scraping this can also mean insufficient request details or web scraper blocking.

To avoid status code 520 when web scraping ensure that sent requests contain all required headers like secret/CSRF tokens, Origin, Referer and other commonly required details. If it's a POST request make sure the sent body matches expected format.

Otherwise, it's possible the scraper is being identified and blocked. For that refer to our [how to scrape without being blocked](https://scrapfly.io/blog/posts/how-to-bypass-anti-bot-protection-when-web-scraping) guide which covers all of the ways to prevent web scrapers from being identified.



 

    



Scale Your Web Scraping

Anti-bot bypass, browser rendering, and rotating proxies, all in one API. Start with 1,000 free credits.

  No credit card required  1,000 free API credits  Anti-bot bypass included 

 [Start Free](https://scrapfly.io/register) [View Docs](https://scrapfly.io/docs/onboarding) 

 Not ready? Get our newsletter instead. 

 

## Explore this Article with AI

 [ ChatGPT ](https://chat.openai.com/?q=Summarize%20this%20page%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2F520-status-code) [ Gemini ](https://www.google.com/search?udm=50&aep=11&q=Summarize%20this%20page%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2F520-status-code) [ Grok ](https://x.com/i/grok?text=Summarize%20this%20page%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2F520-status-code) [ Perplexity ](https://www.perplexity.ai/search/new?q=Summarize%20this%20page%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2F520-status-code) [ Claude ](https://claude.ai/new?q=Summarize%20this%20page%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fanswers%2F520-status-code) 



 ## Related Articles

 [  

 http 

### Guide to Cloudflare's Error Code 520 and How to Fix it

Quick look at error code 520, what does it mean, its common causes, and how it can be prevented.

 

 ](https://scrapfly.io/blog/posts/guide-to-error-code-520-cloudflare-and-fixes) [  

 http 

### What is HTTP 409 Error? (Conflict)

HTTP status code 409 generally means a conflict or mismatch with the server state. Learn why it happens and how to avoid...

 

 ](https://scrapfly.io/blog/posts/what-is-http-409-status-code-conflict) [  

 http 

### What is HTTP 401 Error and How to Fix it

Discover the HTTP 401 error meaning, its causes, and solutions in this comprehensive guide. Learn how 401 unauthorized e...

 

 ](https://scrapfly.io/blog/posts/what-is-http-401-error-and-how-to-fix-it) 

  ## Related Questions

- [ Q Web scraping - what is HTTP 499 status code? ](https://scrapfly.io/blog/answers/499-status-code)
- [ Q Web scraping - what is HTTP 403 status code? ](https://scrapfly.io/blog/answers/403-status-code)
- [ Q Web scraping - what is HTTP 503 status code? ](https://scrapfly.io/blog/answers/503-status-code)
- [ Q What is 444 status code and how to avoid it? ](https://scrapfly.io/blog/answers/444-status-code)
 
  



   



 Bypass anti-bot protection automatically, **1,000 free credits** [Start Free](https://scrapfly.io/register)