Guides

Why am I blocked? How to avoid getting blocked while scraping

By · Published · Updated

TL;DR

  • Why am I blocked? Because sites don’t check one thing. They check 6: your IP, plus your speed, your headers, your connection’s “handshake”, your browser, and the way you behave.
  • What comes back tells you which check caught you. A new proxy won’t fix a bad TLS handshake.
  • Fix the cheap things first: slow down, send real headers and keep cookies. Pay for proxies or unblockers last.

Why am I blocked? Your error tells you which check caught you

Start here. Read the status code and the page the site sent back.

you see what it usually means read
403 the site refused you 403 Forbidden
429 you asked too often, too fast 429 Too Many Requests
1020 on a Cloudflare page a rule the site owner set blocked you Cloudflare 1020
1010 on a Cloudflare page its browser check did not like your client, often the User-Agent Cloudflare 1010
1015 on a Cloudflare page you went over the owner’s rate limit Cloudflare 1015
“Access Denied … Reference #18” Akamai refused you before the site saw you Akamai Access Denied
“You have been blocked” or a slider DataDome thinks you are a bot DataDome
a “Just a moment” page Cloudflare wants to test your browser first Just a moment
Attention Required! | Cloudflare, “Sorry, you have been blocked” Cloudflare’s block page: an owner rule matched you Cloudflare 1020
a rotate-the-object puzzle, or “We’ve used Arkose Labs’ MatchKey” Arkose Labs scored you as a likely bot Arkose Labs MatchKey
a “Press & Hold” button HUMAN (once PerimeterX) thinks you are a bot Press & Hold
a CAPTCHA, or a 405 or 202, on a site that runs on AWS AWS WAF wants proof you are human AWS WAF CAPTCHA
407 your proxy refused your login, not the site 407 Proxy Authentication Required
a puzzle or a checkbox a CAPTCHA: which one says what to do Turnstile · reCAPTCHA v2 · reCAPTCHA v3 · hCaptcha · GeeTest · Arkose

Cloudflare sends error 1020 with an HTTP 403 status, so check the page body, not just the code.

A Cloudflare challenge page says messages like “Just a moment…” or “Verify you are human by completing the action below.” Every one carries the header cf-mitigated: challenge, so your code can spot it.

Each code comes from a different place, so each tells you a different amount.

  • 403 is a plain “no”. Which check fired? It won’t tell you, so you have to work it out from the body and from what changed.
  • 429 is only about speed. The site is asking you to hold off, and often for how long.
  • 1020 is the page Cloudflare shows when a Block rule matches and the owner set no custom response. Requests stopped by the site’s own WAF custom rules land on a different block page. The 1020 page carries a Ray ID (Cloudflare’s id for your request), which the owner can look up to see which rule fired.
  • 407 comes from your proxy. Under RFC 9110, the proxy sends a Proxy-Authenticate header, so you send back a Proxy-Authorization header that holds your login.

The status code on a challenge page varies. RSS readers on itch.io got a 403 with “Verify you are human”. Claude Code’s Windows install command got “Just a moment…” with an HTTP 503. So test for the cf-mitigated header, not for one status code. Cloudflare says challenge is the only value, on every challenge type.

Sites score you on 6 signals

Think of a club bouncer: he checks where you came from, how often you come in, your ID, your handshake, asks you something, then watches how you move. Anti-bot systems check the same 6 things.

Cloudflare turns its checks into a bot score from 1 to 99. A 1 means “quite certain this is a bot”. A 99 means “quite certain this is a human”. The site then blocks, challenges or waves you through.

And this is not only for big sites: Cloudflare’s Bot Fight Mode is free and one switch away for any site on its network.

On Cloudflare’s Enterprise plan, several engines can set your bot score:

  • Heuristics match your request against a database of known bad fingerprints. A confident match scores 1.
  • Machine learning weighs headers, session details and browser signals from traffic across Cloudflare’s network. Most of its scores land between 2 and 99.
  • Anomaly detection learns one site’s normal traffic and gives anything unusual a 1.
  • JavaScript detections run a small invisible script that looks for headless browsers.

Site owners see the scores grouped: 1 is “automated”, 2 to 29 “likely automated”, 30 to 99 “likely human”.

The free Bot Fight Mode can’t be tuned by the owner. It sends suspected bots challenges that make their machine do heavy CPU work, meaning every automated request costs more. Cloudflare warns it may also challenge API and mobile app traffic.

1. Your IP and its network

A site can block or challenge a single IP, one whole ASN (the network that owns the IP, like a cloud host), or a whole country.

So if you scrape from a cloud server, your neighbours’ bad behaviour can be your problem as well.

ASN stands for Autonomous System Number, the id of one network on the open internet. Blocking one ASN blocks every IP in that network in a single rule.

Any site owner can use Cloudflare’s IP Access rules to allow, block or challenge by IP, IP range, ASN or country. Blocking a whole country is Enterprise-only there.

That same tool doubles as a guest list. Sites use it to let in services they trust, such as crawlers, APIs and payment providers. An allowed IP or ASN skips the site’s custom rules, rate limits and managed rules.

What this means for you: a block at this layer doesn’t care how good your code is. Only an IP from a different network changes the answer.

2. How fast you ask

Too many requests in a short time gets you a 429. Limits are usually counted per IP, sometimes per user or cookie.

The site may send a Retry-After header that tells you how long to wait: in MDN’s example, that’s 3,600 seconds (one hour).

A rate limit counts your requests in a time window, against a key. The key is usually your IP. If the site knows the login or cookie, it can count those instead.

On Cloudflare, that matters. Sites with Advanced Rate Limiting can count by your clearance cookie’s id, which stays the same when the cookie refreshes. Rotate IPs but keep the same cf_clearance, and the counter keeps running.

Retry-After comes in 2 shapes. Deal with both:

  • a delay in seconds: Retry-After: 120
  • a date: Retry-After: Wed, 21 Oct 2015 07:28:00 GMT

Advice: on a 429, pause the whole worker until the wait is over, not just the one URL.

3. Your headers

Headers are the notes your request carries, like who you are, what you accept, what language you read. Cloudflare’s model looks at headers, session details and browser signals.

Python’s Requests library, left as is, introduces itself as python-requests/<version>. That’s a bot saying “hi, I’m a bot”.

Each header is one line such as User-Agent: … or Accept-Language: en-US. A browser sends a full set. A bare library sends a handful, and adds its own name.

The User-Agent is the easiest header to fake. Akamai’s paper shows why faking it alone fails: a scraper written in Go sends a Chrome User-Agent, but its HTTP/2 fingerprint shows the real client, and the paper calls that spoof “quite simple” to detect.

So your headers have to agree with everything else. A Chrome User-Agent should arrive carrying a Chrome handshake.

Advice: copy the full header set from your own browser (dev tools, the Network tab), not just the User-Agent. Our Python guide shows a full Chrome set in code.

4. Your TLS and HTTP/2 fingerprint

Before any page loads, the software and the site do a secure “handshake” (TLS). Every client does it a little differently. JA3 and JA4 are fingerprints of that handshake: a browser, a bot and an app each get their own.

HTTP/2 gives away a similar clue. Akamai studied over 10 million HTTP/2 connections and found clients differ in which settings they send, in what order and with what values.

The fingerprint describes your software, not your IP. That’s why perfect headers on top of a Python handshake can still fail, and why swapping proxies doesn’t help.

TLS is the lock on every https connection: it starts with your client’s hello (the ClientHello), which lists the ciphers and extensions it supports. The software decides what goes in that list.

JA3 came first, from Salesforce researchers in 2017. It hashes that hello. Chrome started shuffling its extension order in early 2023, so its JA3 changed on every connection. JA4 sorts the list first, so the shuffle stops mattering. It also adds ALPN (which protocol, like HTTP/2, the client asks for).

HTTP/2 gives a second fingerprint. Akamai looked at 3 frames (SETTINGS, WINDOW_UPDATE and PRIORITY) and the exact order of the pseudo-headers:

  • Chrome 58: :method, :authority, :scheme, :path
  • Firefox 53: :method, :path, :authority, :scheme

Akamai found that many HTTP/2 clients have no way to change these details.

5. JavaScript and browser checks

On some sites, a small script runs in your browser. Cloudflare’s JavaScript detections look for headless browsers (browsers run by code, with no visible window and no human).

A Challenge Page stops your request, tests your browser, and only then lets you in. The no-click version typically takes under 5 seconds. A plain HTTP client can’t run that script at all, so it never gets through.

Pass, and you get a cf_clearance cookie. It is tied to your visitor and device. So you can’t copy it to another computer.

A plain HTTP client downloads the page’s code but never runs it. A browser runs it. That’s the whole test.

There are 3 kinds of Cloudflare Challenge Page:

  • Non-interactive: your browser handles the work, no clicks.
  • Managed: Cloudflare picks the challenge from your browser’s signals. Most humans pass without doing anything. Cloudflare points site owners to this one.
  • Interactive: you have to actually click.

Clearance has tiers. Passing an interactive challenge also covers managed and non-interactive ones. Passing a lower one doesn’t cover a higher one. The site owner sets how long a pass lasts.

JavaScript detections behave differently. The script runs on every HTML page, never pauses you, and records pass or fail for the site’s rules to act on.

6. How you behave

Some systems track you over time: DataDome’s script collects mouse movements and key strokes, plus details about your OS, browser and GPU. It says it can spot Headless Chrome, Puppeteer, Puppeteer Extra Stealth and Selenium, “even modified”.

Cloudflare uses its __cf_bm cookie to measure one user’s request pattern. Other sites learn their normal traffic and flag whatever doesn’t fit.

Behaviour checks judge a session, not one request, so one perfect request can’t beat them.

  • DataDome checks whether built-in browser functions look the way they do in a real browser. That’s how it spots a modified Selenium, and it says it doesn’t use canvas fingerprinting.
  • Cloudflare Precursor, in Armed mode, keeps re-checking your clearance during a session. Look suspicious, and it can cut your clearance and challenge you again before the cookie expires.
  • Cloudflare anomaly detection learns one site’s normal traffic and ignores the User-Agent. Cloudflare doesn’t recommend it on sites with lots of API traffic.

What this means for you: a valid cookie is not a free pass: how you use it keeps counting.

AI user agents and their IPs: checked by name

Some bots say who they are. AI assistants that open a page for a person, like ChatGPT-User, Claude-User and Google-Agent, send their own name in the User-Agent. Sites then check the IP against the list the company publishes.

  • OpenAI lists ChatGPT-User’s IPs in chatgpt-user.json. The copy dated 25 Nov 2026 holds 367 ranges, one of them a /16 (65,536 addresses). PPC Land counted 237 before that update. An allowlist built from an older copy can flag real ChatGPT-User visits as fake.
  • Google says a real Google-Agent request names Google-Agent in its User-Agent and comes from an IP in user-triggered-agents.json (20 ranges on 25 Nov 2026). It asks sites to let verified ones skip CAPTCHAs.
  • Cloudflare lets owners block these agents by name. Bay City News blocked ChatGPT-User and Claude-User with Cloudflare’s AI Crawl Control on 10 Nov 2026, and says those visits “went to zero right away”.
  • Fingerprint, a bot-detection vendor, says it now detects OpenAI’s ChatGPT Dots and Anthropic’s Claude Duet (19 Nov 2026).

What this means for you: a famous bot name is not a disguise. Send ChatGPT-User from your own server and any site that checks the list sees the mismatch.

User-triggered agents play by other rules than crawlers. OpenAI says robots.txt rules “may not apply” to ChatGPT-User, because a user starts each visit.

Google is testing a second proof: Web Bot Auth, a signature in the request headers (RFC 9421). Signed Google-Agent requests carry Signature-Agent: g="https://agent.bot.goog", plus Signature and Signature-Input headers. A signature can’t be copied the way a header can.

Fingerprint’s own take, on its blog: Dots signs its requests with Web Bot Auth, while Duet declares itself with a User-Agent and published IPs. A User-Agent “is just text, and anyone can send one”, it writes.

One more Google tip shows how site owners trip up: many users share the same agent IPs, so per-IP rate limits can block real Google-Agent traffic.

Which tools got past Cloudflare, DataDome and Akamai

We tested it. 11 free tools on 100 sites, each tool as installed with one setting for every site, a fresh IP for every load (open-source benchmark, run scrapenews-open-source-benchmark-2026-11-26, 26 Nov 2026). Share of loads that passed, on the sites where we saw each wall (all sites):

ToolCloudflareDataDomeAkamai Bot Manager
Camoufox46% (25/54)36% (16/45)59% (32/54)
Scrapling StealthyFetcher76% (41/54)11% (5/45)44% (24/54)
Botasaurus69% (37/54)29% (13/45)56% (30/54)
nodriver63% (34/54)31% (14/45)56% (30/54)
Patchright69% (37/54)18% (8/45)50% (27/54)
curl-impersonate56% (30/54)27% (12/45)44% (24/54)
curl_cffi57% (31/54)29% (13/45)44% (24/54)
Scrapling Fetcher43% (23/54)6.7% (3/45)44% (24/54)
Crawl4AI63% (34/54)11% (5/45)43% (23/54)
tls-client52% (28/54)24% (11/45)28% (15/54)
curl (plain)31% (17/54)11% (5/45)26% (14/54)
  • Cloudflare: top tools: Scrapling StealthyFetcher, Botasaurus, Patchright, nodriver and Crawl4AI tie (63–76%). Top HTTP clients: curl_cffi, curl-impersonate, tls-client and Scrapling Fetcher tie (43–57%).
  • DataDome: top tools: Camoufox, nodriver, Botasaurus, curl_cffi, curl-impersonate and 2 more tie (18–36%). Top HTTP clients: curl_cffi, curl-impersonate and tls-client tie (24–29%).
  • Akamai Bot Manager: top tools: Camoufox, Botasaurus, nodriver, Patchright, Scrapling StealthyFetcher and 4 more tie (43–59%). Top HTTP clients: curl-impersonate, curl_cffi, Scrapling Fetcher and tls-client tie (28–44%).

Tie = the gap to the best is inside the margin of error, so the data can’t order those tools.

What this means for you: no free tool gets through every wall. Find out which wall your target runs (its block page, its cookies), then pick from the tools at the top on it.

Open questions

  • How often each step on this page gets you through. So far we’ve measured three: a new IP (our proxy benchmark), a real browser on a residential IP (the 403 and 429 pages), and free tools against each wall (above). Headers alone and unblockers come with our next runs.
  • Which paid step is enough against which protection: unblockers and browser + proxy combos. The Arena will take that on.

Without those numbers, the list below is ordered by cost, not by measured success. That’s honest, but it leaves a real question open: is a header fix enough on your target, or do you need a paid proxy?

Getting it wrong costs you either way. Skip a free step, and you pay for proxies you didn’t need; stop too early, and you lose time on a fix that can’t work against that check.

Every result we publish names its run and date, and its raw data is public. Until the rest are in, test on your own target, one change at a time.

What to try, cheapest first

Only one change per test. Test again after each step.

  1. Read the answer. Status code, page body, headers. Match it against the table above.
  2. Slow down. Fewer requests at once, pauses between them. Obey Retry-After. Costs nothing.
  3. Send browser headers. A real browser User-Agent, plus Accept and Accept-Language. No cost.
  4. Keep your cookies. Use a session, so cookies like __cf_bm and cf_clearance come along with each request. Free.
  5. Fix your handshake. Use curl_cffi or curl-impersonate to copy a real browser’s TLS and its HTTP/2 fingerprint. Open source, so free.
  6. Change your IP’s network. If your cloud host gets blocked, try a proxy from another network, such as a residential proxy (an IP from someone’s home internet). Paid. Getting 407? That’s your proxy login rather than the site.
  7. Use a real browser. Playwright or Puppeteer runs the JavaScript checks, but headless mode has its own tells (details below).
  8. Pay someone to do it. An unblocker API runs the browsers and proxies for you. It’s paid.

Got a 1020? Cloudflare’s own advice, if you’re not the owner, is to send the site owner a screenshot of the error. It’s their rule.

Read the site’s robots.txt too: it may name the tool. As of 26 Nov 2026, the Wall Street Journal’s said no to every bot except 62 by name, and Amazon’s told 99 bots to keep out, Scrapy and Crawl4AI included. (Full story)

Why this order? Each step costs more than the one before, in money or in effort. Steps 2 to 4 are a few lines of code. Step 5 swaps your HTTP library. Steps 6 and 8 are paid services. Step 7 means running a whole browser for every page.

A new IP sits late on purpose: your headers and handshake travel with you through every proxy. Fix them first, or you pay for fresh IPs that get blocked for the same reason.

Skip ahead when the error says so. A Challenge Page needs a JavaScript engine, so steps 2 to 5 by themselves won’t get you past it. Go to step 7 or 8.

A 1020 is the one case with no trick in the list. The owner wrote a rule, so only the owner can see which one.

Paste into your AI

My scraper is blocked by a website.
Here is what I get back: <status code>, <first 30 lines of the response body>, <response headers>.
My setup: <language + library>, <proxy or none>, <requests per minute>, <headers I send>.
Tell me which check most likely caught me: IP, rate, headers, TLS/HTTP2 fingerprint, JavaScript check, or behaviour.
Then give me the cheapest next step to test, and how I'll know it worked.

The AI can only guess as well as your evidence lets it. The response body tells it the most: a Cloudflare 1020 page, for example, shows its Ray ID and names the error.

Before you send it:

  • Remove cookies, API keys and proxy passwords from your headers.
  • Cut a whole HTML page down to its first lines.
  • Say what changed just before the blocks started: a new proxy, more threads, a new part of the website.

Then request one test at a time. 10 fixes tried at once can’t tell you which one worked.

Dev depth: fingerprints and headless tells

Requests and httpx cannot change their TLS fingerprint. curl_cffi can, for both TLS/JA3 and HTTP/2. Its README puts it simply: blocked “for no obvious reason”? Give it a go.

import curl_cffi

r = curl_cffi.get("https://tls.browserleaks.com/json", impersonate="chrome")
print(r.json())

proxies = {"https": "http://localhost:3128"}
r = curl_cffi.get("https://tls.browserleaks.com/json", impersonate="chrome", proxies=proxies)

impersonate="chrome" tracks the newest Chrome profile as curl_cffi updates; pin a version with, for example, "chrome124".

Real browsers have a built-in giveaway. In Chrome, navigator.webdriver is true when you start it with:

  • --enable-automation
  • --headless
  • --remote-debugging-port=0

Any script on the site can read it.

On Cloudflare, JA4 data also feeds network-wide stats for each fingerprint, such as how many IPs and user agents use it in an hour. A rare fingerprint stands out.

The test URL in the example, tls.browserleaks.com/json, sends back your fingerprint: run it with Requests, then with curl_cffi, and compare the ja3n_hash. With impersonate, it should match whatever browser you picked.

curl_cffi 0.17.0 added profiles for Chrome 151/152, Safari 27 and Firefox 153 to 155. For anything else you can pass your own ja3= and akamai= strings. It also speaks HTTP/3 (http_version="v3").

The JA4 stats are values owners can use in rules. For example:

  • ips_rank_1h: how many different IPs used that fingerprint over the last hour
  • uas_rank_1h: the count of user agents
  • browser_ratio_1h: share of requests carrying browser user agents

Proxies can leak too. Akamai notes that when TCP says “Windows 10” but TLS and HTTP/2 say “Chrome on a Mac”, the site can guess a proxy sits in the middle.

Tools for this

ToolPrice
Bright Data Web Unlocker: Unblocking API from Bright Data: you send a URL, it handles proxies, retries and CAPTCHAs. Billed per 1,000 requests.$1.50/1k req
curl_cffi: Python HTTP client on curl-impersonate that can copy a browser's TLS, JA3 and HTTP/2 fingerprints.Free
curl-impersonate: Special build of curl that looks like Chrome or Firefox at the TLS and HTTP/2 level.Free
Oxylabs Web Unblocker: Oxylabs proxy-style endpoint that handles blocks for you, billed per GB of traffic.$7.20/GB
Playwright: Microsoft's framework to drive Chromium, Firefox and WebKit from code with one API. Made for testing; also used to scrape.Free
Puppeteer: JavaScript library to control Chrome and Firefox from code.Free
Selenium: Long-standing browser automation framework built on WebDriver, with bindings for many languages.Free

Sources

  1. Cloudflare docs: Bot scores developers.cloudflare.com
  2. Cloudflare docs: JA3/JA4 fingerprint developers.cloudflare.com
  3. Cloudflare docs: JA4 Signals Intelligence developers.cloudflare.com
  4. Cloudflare blog: JA4 fingerprints and inter-request signals blog.cloudflare.com
  5. Cloudflare docs: Bot Fight Mode developers.cloudflare.com
  6. Cloudflare docs: How Challenges work developers.cloudflare.com
  7. Cloudflare docs: Interstitial Challenge Pages developers.cloudflare.com
  8. Cloudflare docs: Clearance (cf_clearance cookie) developers.cloudflare.com
  9. Cloudflare docs: Error 1020 developers.cloudflare.com
  10. Cloudflare docs: IP Access rules developers.cloudflare.com
  11. Akamai white paper (2017): Passive Fingerprinting of HTTP/2 Clients blackhat.com
  12. MDN: 429 Too Many Requests developer.mozilla.org
  13. MDN: Retry-After header developer.mozilla.org
  14. MDN: Navigator.webdriver developer.mozilla.org
  15. RFC 9110 §15.5.8: 407 Proxy Authentication Required rfc-editor.org
  16. DataDome docs: JavaScript Tag docs.datadome.co
  17. curl_cffi on GitHub (README) github.com
  18. curl_cffi docs: Features curl-cffi.readthedocs.io
  19. Requests source: default_user_agent requests.readthedocs.io
  20. Cloudflare docs: Detect a Challenge Page response developers.cloudflare.com
  21. Claude Code issue #55346: install command gets "Just a moment..." with HTTP 503 github.com
  22. itch.io issue #1838: RSS readers get 403 and "Verify you are human" github.com
  23. The Wall Street Journal: robots.txt (read 2026-11-26) wsj.com
  24. Amazon: robots.txt (read 2026-11-26) amazon.com
  25. OpenAI: ChatGPT-User IP ranges (file of 2026-11-25) openai.com
  26. OpenAI docs: Overview of OpenAI crawlers developers.openai.com
  27. Google: Allow Google-Agent traffic (updated 2026-11-17) developers.google.com
  28. Google: user-triggered agent IP ranges (file of 2026-11-25) developers.google.com
  29. Fingerprint: AI agent detection for ChatGPT Dots and Claude Duet (press release, 2026-11-19) businesswire.com
  30. PPC Land: OpenAI adds over 2,000 addresses ChatGPT uses (2026-11-25) ppc.land
  31. Local News Matters (Bay City News): how we blocked AI bots (2026-11-20) localnewsmatters.org
  32. Fingerprint blog: How to detect Claude Duet (2026-11-12) fingerprint.com