ScrapingProxies

How to Fix Cloudflare Error 1020 When Scraping (2026 Guide)

DW
DevOps Engineer
Published
July 5, 2026
Updated
October 14, 2026
Read Time
4 min read
1020 is the edge refusing the request before origin

You pointed requests or Playwright at a target and got Error 1020: Access denied. The HTML never arrived. In 2026, Cloudflare sits in front of a large share of retail, SaaS, and media sites — so every scraping team hits 1020 eventually.

This guide is a fix order that works in production: diagnose the layer, apply the smallest change that clears the block, then scale.

What Cloudflare 1020 actually means

Error 1020 is not a generic HTTP status — it is Cloudflare-specific. The edge proxy decided your request should not proceed. Typical triggers:

  1. IP reputation — datacenter ASN, burned residential, or geo mismatch
  2. TLS / JA3 fingerprint — Python requests does not look like Chrome
  3. Missing post-challenge state — you need cookies from a JS interstitial
  4. Behavior — burst concurrency, identical headers, no referrers

1015, 1020, and 429

These three show up in the same logs and they are not the same failure.

CodeWhat it meansFirst change
Cloudflare 1015The site owner’s rate-limiting rule blocked the client. Cloudflare’s docs title this “You are being rate limited.”Slow down and back off. A new IP does not always clear it.
Cloudflare 1020Access denied at the edge, before the origin. This guide.Reputation, TLS, or behavior.
HTTP 429Too many requests. Often the origin, sometimes another vendor.Pace and concurrency.

If the body says error 1015, read How to fix Cloudflare error 1015. HTTP 429 is covered in proxy errors 403 and 429 and the 403/429 solution.

Pro Tip

[!TIP] Pro Tip: Log the response body on 1020. Cloudflare often embeds a Ray ID and challenge type — save it when opening a support ticket with the site owner.

Reputation, TLS, cookies, or velocity
Four triggers — reputation, TLS, cookies, or velocity — not four products.

Step 1: Confirm it is Cloudflare (not origin 403)

Check headers for cf-ray, server: cloudflare, or HTML containing cdn-cgi/challenge. If present, tuning origin headers will not help — you are blocked at the edge.

For a quick sanity check, route one request through Aethyn Premium residential at proxy.aethyn.io:2099 and compare pass rate. If 1020 disappears, reputation was the primary issue. If it persists, move to TLS and JS layers.

If you see cf-ray, origin headers will not help
If you see cf-ray, origin headers will not help. Tune the edge, not the origin.

Step 2: Fix IP reputation first

SignalFix
Datacenter IPSwitch to Premium residential
Commodity residential blockedStep up to Elite residential
Same subnet hammeredRotate per session; lower concurrency
Wrong countryMatch proxy geo to the site's market (country-us in username)

See our solution guide for scraping behind Cloudflare for a Playwright + Elite workflow.

Datacenter ASN is a non-starter; Elite when residential is burned
Datacenter ASN is a non-starter. Premium is country and volume; Elite is city plus ISP when residential is burned.

Step 3: Upgrade transport — browser-grade TLS

Cloudflare Bot Management compares your TLS fingerprint (JA3/JA4) to known browsers. Plain urllib and requests fail this check on strict sites.

Fix: drive the page with Playwright over Aethyn proxies. The browser supplies legitimate TLS, HTTP/2 settings, and JS execution for interstitials.

Read the deep dive: TLS fingerprinting for scrapers.

A household IP with a library handshake still fails
Playwright supplies browser-grade TLS. SOCKS5 does not change JA3. Sticky holds one rotating-pool IP for 1–1440 minutes, default 30, through a JS challenge.

Step 4: Handle JS challenges and cookies

On Managed Challenge or Interactive Challenge pages:

  1. Launch Playwright with proxy at browser context level
  2. Wait for networkidle or a known selector
  3. Export cookies to your HTTP client if you must drop to requests afterward
  4. Keep sticky sessions — rotating mid-challenge resets suspicion

Do not screenshot-solve CAPTCHAs on sites you are not authorized to test.

Step 5: Pace like a human

Even perfect IPs fail if you send 200 parallel requests per second.

  • Cap concurrency (start at 3–5 workers per domain)
  • Randomize inter-request delay (200–800 ms jitter)
  • Rotate User-Agent only when you rotate IP — mismatched pairs score badly
  • Cache aggressively — fewer requests means fewer chances to trigger 1020

Premium vs Elite for Cloudflare targets

Target difficultyPool
Blogs, directories, light CFPremium residential
Retail, fintech, Bot ManagementElite residential
Account login + checkoutElite + sticky session + anti-detect browser

Aethyn Premium starts at €2.00/GB; Elite adds stricter sourcing and city/ISP targeting for hard exits.

When to stop fighting 1020

If the data is available via an official API, partner feed, or licensed dataset — use that first. Proxies are for public web collection, not for circumventing access controls on systems you should not touch.

FAQ

Common questions about this article

What does Cloudflare error 1020 mean?
Error 1020 is Cloudflare's 'Access denied' response — the edge blocked your request before it reached the origin. Common causes are low IP reputation, datacenter ASN ranges, mismatched TLS or browser fingerprints, missing cookies after a challenge, or request velocity that looks automated.
Can residential proxies fix Cloudflare 1020?
Often yes, when the block is IP-based. Premium residential helps on moderate Cloudflare settings; Elite residential with city/ISP targeting helps when Bot Management scores reputation aggressively. Proxies alone do not fix bad TLS fingerprints — pair them with a real browser or Playwright.
Is bypassing Cloudflare legal?
Accessing publicly available pages you are allowed to collect, at reasonable rates, is broadly acceptable in many jurisdictions — but you must respect robots.txt, terms of service, and privacy laws. This guide is for engineering teams collecting public data responsibly, not for attacking private systems.
Share this article

Guides, integrations & docs

Continue reading

Premium or Elite residential proxies

Join developers scaling scraping and automation with Aethyn Premium and Elite pools from €2.00/GB.

Back to all articles