ProxyZen

Cloudflare errors 520–525, 1005, 1015 and 1020 explained

2 December 2026 · 5 min read
Reviewed by the ProxyZen team

What Cloudflare error codes 520, 521, 522, 524, 525, 1005, 1015 and 1020 mean, who is at fault — you or the website — and how to fix them, including when you work through proxies.

About one in five websites sits behind Cloudflare. When something goes wrong between you, Cloudflare and the website's own server, you do not see a normal browser error but a Cloudflare page with a number and a Ray ID. The number tells you exactly where the problem is.

How to tell a website uses Cloudflare

Look at the response headers. We checked our own site on 2 December 2026:

$ curl -sI https://proxyzen.net/en | grep -iE "server|cf-ray"
server: cloudflare
cf-ray: a63be4cec842ebaa-CDG

server: cloudflare and a cf-ray header mean the request went through Cloudflare. The last part of the Ray ID (CDG) is the Cloudflare data center that answered — here Paris. Any site behind Cloudflare also answers at /cdn-cgi/trace with plain-text details of your connection.

Two families of errors

  • 5xx (520–527) — Cloudflare could not get a proper answer from the website's server (the "origin"). Usually it is the website's problem, not yours.
  • 1xxx (1005, 1015, 1020 …) — Cloudflare deliberately blocked you by a rule the website owner set. Here your IP, request rate or browser is the reason.

5xx errors: the website's server

Code What happened What you can do
520 Web server returned an unknown error The origin closed the connection or sent an answer Cloudflare could not read Reload later. If only your requests fail, check request size and headers (see the test below)
521 Web server is down The origin refused the connection Wait — the site is down or blocks Cloudflare's IPs
522 Connection timed out Cloudflare could not connect to the origin in time Wait; for site owners — server overload or firewall. More in “HTTP errors 403, 429, 502, 522”
523 Origin is unreachable Wrong DNS or routing to the origin Only the site owner can fix it
524 A timeout occurred Connection opened, but the origin took more than 100 seconds to answer Repeat later; for scrapers — ask for smaller pages
525 SSL handshake failed Cloudflare and the origin could not agree on HTTPS Site owner's certificate problem
526 Invalid SSL certificate The origin's certificate is expired or wrong Site owner's problem

Our test: 520 from an oversized request. On 2 December 2026 we sent our own site a request with one extra 16 KB header. The origin server refused it, and Cloudflare returned 520 instead of the page:

$ curl -s -o /dev/null -w '%{http_code}' -H "X-Big: <16 000 characters>" https://proxyzen.net/en
520

So a 520 that only you get often means your request is unusual: huge cookies, very long headers or URL. Clear the site's cookies or trim the headers your script sends.

1xxx errors: you are blocked by a rule

Code Reason What helps
1005 Access denied — banned the autonomous system number (ASN) The site blocks the whole network your IP belongs to, typically a hosting or VPN provider An IP from another network: residential or mobile
1006 / 1007 / 1008 Access denied Your IP is banned by the owner Another IP
1009 Country or region banned The site does not accept visitors from your country An IP in an allowed country
1010 Browser signature banned Your browser or script looks like a bot (for example a plain HTTP client) A real browser or an antidetect browser
1012 Access denied A generic rule match, often IP reputation Clean IP, normal browser
1015 You are being rate limited Too many requests from one IP in a short time Slow down, spread requests across several IPs
1020 Access denied (firewall rule) A custom rule matched your IP, country, ASN or User-Agent Change what matched: IP, country or headers

Error 1015 is temporary: the block usually lifts after a short pause. 1005 and 1020 stay until something about your request changes.

Why proxies matter here

Website owners mostly block datacenter networks with 1005 and 1020, because that is where bots live. Our IP checker shows how such networks look: Cloudflare's own 1.1.1.1 gets the "datacenter" flag and a fraud score of 33, while Google's 8.8.8.8 is a "business" connection with a score of 0. Read more in “How websites detect proxies”.

What to choose:

  1. 1005, 1009, 1020 — the block is about the network or country. A residential proxy gives you an IP of a home provider in the right country; mobile proxies — an IP of a mobile operator, which sites block least of all.
  2. 1015 — the block is about speed. Use rotation: with the ProxyZen residential gateway every request can go out from a new IP, or you can keep one IP for a while with a sticky session. See “Rotating vs sticky IP”.
  3. 1010 — the block is about the client. A proxy alone will not help: send requests from a real browser engine (Playwright, Puppeteer) or an antidetect browser.

Free and shared proxies make these errors worse: the same IP is used by hundreds of people and has long been on block lists.

Quick checklist

  • 5xx and everyone sees it → the site is broken, wait.
  • 5xx only for you → check cookies, header size, request size.
  • 1015 → fewer requests per IP, add pauses or rotation.
  • 1005 / 1020 / 1009 → change the network or country of your IP.
  • 1010 → change the client, not the IP.

Check how your current IP looks to websites in our free IP checker — fraud score, datacenter or residential, and blacklists.

Try ProxyZen

Private IPv4 and IPv6 for 3 to 90 days, residential and mobile per GB. Instant delivery, HTTP(S) and SOCKS5.

Trustpilot Write a review