Zenrows
Talk to sales Start free

What is a 520 error?

A 520 is not a standard HTTP status code. Cloudflare defines it, along with the rest of the 52x range, to describe problems between Cloudflare and the origin server it sits in front of. A 520 specifically means the connection to the origin succeeded but the response was something Cloudflare could not make sense of.

It is the catch-all of that range, which is why it carries the least diagnostic value.

What Cloudflare means by an unreadable response

The origin sent something outside what Cloudflare will forward:

  • An empty response, where the connection opened and closed with no data.
  • Headers that are malformed or exceed Cloudflare's size limits, often from an oversized cookie.
  • A connection reset by the origin partway through sending.
  • A response violating protocol in a way the proxy will not pass on.

From the visitor's side none of this is visible. You get a Cloudflare-branded error page with 520 on it and a ray ID.

Why scrapers see it more often

Sometimes a 520 is a genuine origin problem and everyone sees it. Often it is not, and the difference matters.

Anti-bot layers can cause an origin to behave abnormally toward requests they distrust, and the resulting mess surfaces as a 520 rather than an honest 403. An unusually long header set, a cookie jar that has grown large across a crawl, or a request shape the origin's application does not handle can all produce a response Cloudflare rejects.

The test is the same as for any ambiguous error: load the page in a normal browser at the same moment. If it works, the 520 is about your request.

What to try

Trim before you retry. Reduce the size of what you are sending, especially cookies and custom headers, since header size limits are a common and easily missed cause. Then check whether the request works without the proxy, and whether it works with a full browser header set.

If the page loads for everyone else and 520s only for you, treat it as a soft block and work on the request rather than waiting for the site to recover. The Cloudflare bypass guide covers the wider set of Cloudflare obstacles, and the numbered 1xxx errors that appear on Cloudflare's block pages are a separate family from these 52x codes.

Go deeper on the blog

Last updated: Aug 16, 2026

Get reliable web data in minutes.

Free plan, 5,000 credits every month, no credit card required.