Scalebrowser

Cloudflare 403 forbidden: what error 1020 means

What a Cloudflare 403 and error 1020 tell an agent: the site owner's rule, how to tell a block from a challenge, the 1xxx codes and what to do next.

Davide Valli · Founder, Scalebrowser

Published Nov 8, 2026 · 8 min read

Short answer

A Cloudflare 403 with error 1020 means a firewall rule written by the site owner refused the request before any challenge ran, and only that owner can lift it. A 403 can also be a challenge page, which carries the header cf-mitigated: challenge and can be passed: Cloudflare Turnstile in managed mode returned a token to our agent after 1.7 seconds with no interaction. Cloudflare's documentation uses 1009 for a banned country, 1010 for a banned browser signature and 1015 for a rate limit.
1020, the site owner's rule, beside a shield marked 403

Your agent loads a page that worked yesterday and gets a Cloudflare page instead: 403 Forbidden, sometimes with "Error 1020 Access denied" and a Ray ID underneath. The status code is the same for very different causes. Some of them are a question the browser can answer, and some are a decision that nothing on the agent's side can change. The difference is written into the response, and reading it first saves an afternoon of changing the wrong thing.

What does a Cloudflare 403 forbidden mean?

A Cloudflare 403 forbidden means the request was understood and refused. Cloudflare's 403 troubleshooting page defines it as a request "understood by the server but cannot be fulfilled due to insufficient permissions to access the requested resource", and it separates two senders. A 403 without Cloudflare branding comes from the origin server behind Cloudflare, for example from an .htaccess rule. A 403 with Cloudflare branding was produced by Cloudflare itself, and the page lists six sources for it:

  • WAF rules: managed or custom rules of the site with a challenge or block action.
  • Security Level: a zone setting that today mainly switches Under Attack mode on and off.
  • DDoS protection: Cloudflare's own mitigation of attack traffic.
  • Browser Integrity Check: a check for "common HTTP headers abused most commonly by spammers", on by default.
  • 1xxx errors: a numbered refusal such as 1020, shown on the error page.
  • Validation Checks: a check on every request that blocks malformed requests and cannot be turned off.

The same page mentions one more, rarer case: an unstyled 403 raised "before domain configuration is loaded", for example on an SNI mismatch, which Cloudflare does not log at all.

What does Cloudflare error 1020 access denied mean?

Cloudflare error 1020 means a firewall rule of the Cloudflare customer, the site owner, denied the request. Cloudflare's error 1020 page states the cause as "A client or browser is blocked by a Cloudflare customer's Firewall Rules". The error page carries a Ray ID, and the owner is told to search the Security Events log "for the Ray ID or client IP address" and then either update the rule or allow the address. Three neighbouring codes name narrower causes.

CodeCloudflare's wordingWho decidedWhat the agent can change
1009"Country or region banned"the site ownernothing on the page; the country comes from the IP address
1010banned "based on your browser's signature"the site ownernothing it can see; the owner can turn the Browser Integrity Check off
1015"You are being rate limited"the site owner's rate limiting rulesthe request rate
1020"Access denied", blocked by a firewall rulethe site ownernothing; the owner has to change the rule
Source: Cloudflare 1xxx error documentation, 4 pages, read 27 September 2026

Every row names the site owner. None of the four is a verdict that the browser failed a test, and none of them is a challenge the agent could solve.

Is a Cloudflare 403 a block or a challenge?

A Cloudflare 403 is a challenge when the response carries the header cf-mitigated: challenge, and a block when it does not. Cloudflare's guide to detecting a challenge page says the challenge response "will have the cf-mitigated header present and set to challenge", whatever the challenge type. The block action works the other way: under Cloudflare's rules actions, "matching requests are denied access to the site", with status 403 for most security features and 429 for rate limiting.

A challenge is a question, and a browser can answer it. We measured Cloudflare's challenge widget, Turnstile, on production site keys with our agent working a real browser.

Turnstile modeSiteResultTime to tokenRuns
invisibleCloudflare dashboard logintoken, no interaction2.9 seconds2
managed5sim logintoken, no interaction1.7 seconds1
managed, checkbox forcedCloudflare sign-uppassed after one clicknot timed2 of 2 on 14 August
Source: Scalebrowser agent through its MCP tools, production Turnstile keys, 4 to 14 August 2026
A 403 with error 1009, 1010, 1015 or 1020 is the site owner's rule, and nothing on the page lifts it. A 403 that carries cf-mitigated: challenge can be passed: managed Turnstile gave our agent a token after 1.7 seconds.

The forced checkbox failed twice on 4 August 2026 before it passed 2 of 2 on 14 August, and why the first two failed is not explained. A block has no such second chance: a 1020 returns the same page however well the browser behaves.

Why does Cloudflare return 403 forbidden to an agent?

Cloudflare returns 403 forbidden to an agent because a rule of the site matched something the request carried. Five of the inputs a site owner can write a Cloudflare rule on match an agent's request directly:

  • The address. The field ip.src.asnum holds "the Autonomous System (AS) number associated with the client IP address", so a rule can refuse a whole hosting provider, and a country rule produces 1009.
  • The browser signature. Cloudflare's Browser Integrity Check challenges visitors "without a user agent or with a non-standard user agent", and a site owner's ban on a browser signature produces 1010.
  • The rate. Rate limiting rules produce 1015, or a 429 instead of a 403.
  • The bot score. On Enterprise plans with Bot Management, cf.bot_management.score "represents the likelihood that a request originates from a bot" on a scale from 1 to 99, and a rule can block below any threshold.
  • The AI bot policy. Cloudflare's AI bot documentation announced that from 15 September 2026, new domains block "bots classified as Training or as Agent" on pages that display ads.

An address rule or a country rule needs no script at all, so the request is refused before any challenge could look at the browser. Only the bot score looks past the request's headers at the browser itself, and it only decides where the owner wrote a rule that uses it. How a user agent that rotates contradicts the engine is covered in Random user agent. The core count and memory a browser reports are covered in hardwareConcurrency and deviceMemory. The values behind navigator.connection are covered in navigator.connection.

Why is Cloudflare suddenly blocking an agent that worked yesterday?

Cloudflare suddenly blocks an agent when the rule, the address or the rate changed, even if the agent did not. A site owner can add a rule at any time, and a site that moved behind Cloudflare after 15 September 2026 starts with the new AI bot defaults. A proxy that rotates can move the agent into an address range the site already refuses. And an agent that retries a failed step in a loop can cross a rate limit that a person clicking through the same page never reaches.

Scalebrowser

Scalebrowser runs real browser profiles on your own PC: your AI agent drives them over MCP and signs in without ever seeing a password.

Download free

What should an agent do after a 403?

An agent should read the 403 before it changes anything, because the response already says which of the cases above applies. Five steps, in this order:

  1. Read the body. A Cloudflare branded page with a 1xxx code and a Ray ID came from Cloudflare; an unbranded one came from the origin server.
  2. Check the header. cf-mitigated: challenge means a challenge that a real browser can work; no such header on a branded 403 means a block.
  3. Stop retrying. Repeated requests feed the rate limiting rules behind 1015 and 429 and turn one refusal into several.
  4. Hand a 1020 to a person. Cloudflare tells visitors to send the site owner a screenshot of the 1020 error message, which carries the Ray ID; for an agent that is a message to its operator, not another attempt.
  5. Identify the agent where it acts for its operator. Cloudflare verifies a bot through one of 3 methods, a Web Bot Auth signature, a published IP list with a stable user agent, or reverse DNS, and has counted signed agents as verified bots since 1 July 2026.

Steps 1 and 2 need a browser, not a bare HTTP client: curl gets a 403 for a wrong address and for a bot wall alike, as the page on testing your setup points out. The verification challenges page lists which challenge types an agent in a real browser has passed, so a challenge found in step 2 can be looked up there.

Is a Cloudflare 403 permanent?

No, a Cloudflare 403 lasts as long as the rule, the score or the rate that produced it. A rate limit ends when the request rate falls back under the owner's limit. A 1020 stays until the owner changes the firewall rule or allows the address in IP Access Rules, which Cloudflare's 1020 page names as the two ways out. A challenge ends as soon as it is passed, and it comes back when the cf_clearance cookie it set expires, after 30 minutes by default according to Cloudflare's Challenge Passage page.

Real browser profiles for your AI agent, on your PC.

Each profile keeps its own identity, logins and proxy. Your agent drives it over MCP and signs in without seeing a password.

Download free for Windows

Free plan with 3 profiles · No credit card · Runs on your PC

Written by

Davide Valli

Founder, Scalebrowser

Builds Scalebrowser, browser automation for the agentic era that runs on your own machine. Measures every change a web page could observe against a real browser before it ships, and writes up the ones that turned out wrong.

All articles by Davide Valli

More in Detection

All 19 articles in Detection