Cloudflare Error 1005, 1006, 1009: banned ASN, IP or country
What you see
Error 1005 Access deniedError 1006 Access deniedError 1009 Access deniedhas banned your IP address
What it means
The site sits behind Cloudflare, and its owner banned where you come from. 1005 = your network (ASN). 1006, 1007, 1008 = your IP address. 1009 = your country or region. Retrying won’t help. Come from a different network, IP or country, or ask the site owner.
Why it happens
The owner added a block rule, which is usually an IP Access rule. That is Cloudflare’s tool to block, challenge or allow visitors by four things: an IP address, an IP range, an ASN or a country.
An ASN (Autonomous System Number) is the ID of the network that owns your IP. Think of an ISP, a mobile carrier, or a cloud host. Block a single ASN and every IP in it is locked out.
Here are the usual causes, most common first:
- Your IP sits in a cloud or VPN network (1005). Owners block entire hosting networks. A Crunchyroll visitor got 1005 for ASN
14061. Another user in that thread said the site had blocked all DigitalOcean IPs. - Your IP, or its range, was banned (1006). A rule can hit one IP or a whole range: a
/24is 256 addresses and a/16is 65,536. A Crunchyroll team member on the thread said they block IPs or ranges that show “heightened levels of abusive behavior”. - You share the IP. On a VPN or a NAT network (many users behind one public address), someone else’s behaviour can get the address blocked.
- Your country is banned (1009). The site checks the country of the IP it sees. With a VPN or Cloudflare WARP, that’s the exit IP’s country, not yours.
- Cloudflare can’t place your IP (1009 with
XX).XXis Cloudflare’s code for unknown or reserved. One user on a newly issued IP range got 1009 withXXon a site that blocks unknown countries.
The block is the owner’s choice and not Cloudflare’s.
We probed 100 well-known sites (datacenter IPs on 25 Nov 2026, residential retries on 26 Nov 2026). Pages with one of these errors: 0. The Cloudflare blocks we hit were the WAF block page or a challenge.
Why the ASN ban is so blunt: one rule can shut out a whole cloud provider. The rule doesn’t care what you do. It only checks who owns your IP.
A fresh IP may still get 1006: if the owner banned a range, the next IP you get from the same provider can land in it. An IPv6 rule can cover a /64, a /48 or even a /32, which is a huge number of addresses.
Why Cloudflare can get your country wrong: its docs call IP geolocation “an estimate, not an exact science”. IP addresses get reassigned, and mobile and CGNAT ones (many users behind one shared address) rotate a lot.
Country is a field the rule matches on, meaning the special codes count too: T1 is Cloudflare’s code for Tor exit nodes, XX for unknown.
Fix it
- Read the value in brackets. The page names what was banned: the ASN number (1005), your IP (1006) or the country code (1009). That tells you what to change.
- Don’t retry. Cloudflare lists these codes as not retryable, and a retry from that same place meets the same ban.
- For 1005, change the network and not just the IP. Leave the cloud server or VPN. A residential proxy (an IP address borrowed from someone’s home internet) comes from a home ISP’s network, not a cloud host’s.
- For 1006, change the IP and the range. Turn off the VPN or WARP. On a proxy, choose a different subnet or provider, because owners can ban whole ranges.
- For 1009, come from an allowed country. Turn off WARP or the VPN, or use a proxy that exits in a country the site serves. If the code is
XX, your IP has no known country: try a different IP, or ask for a fix (step 7). - Ask the owner if you have a real reason to access the site. Send a screenshot of the error page, the Ray ID and the UTC time on it. Cloudflare support can’t lift the ban.
- Wrong country for your own IP? Fill in Cloudflare’s IP geolocation correction form with the IP range and the right location. According to Cloudflare, a confirmed change usually takes a few business days.
- If you own the site: search Security > Events for the Ray ID or the visitor’s IP. That shows which rule blocked them. After that, allow the IP, ASN or country in IP Access rules.
| Vendor, plan it picks | Total a month | $/GB | Total a year | Free trial · note · source |
|---|---|---|---|---|
| HProxy Residential ProxiesLite: 10 GB | $4.70 | $0.47 | $56.40 | hproxy.com · 29 Nov 2026 |
| CakeIP10GB | $6.00 | $0.60 | $72 | promo pricecakeip.com · 29 Nov 2026 |
| Geonode Residential Proxies10 GB Plan | $7.92 | $0.79 | $95.04 | free trial: $5 = 10 GB for 3 daysgeonode.com · 29 Nov 2026 |
| ProxyBase Residential ProxiesPay as you go | $8.50 | $0.85 | $102 | proxybase.org · 29 Nov 2026 |
List prices from each vendor’s pricing page, US dollars before tax, live from our price data. Your own size, in the price calculator: Residential proxies.
Why a residential proxy helps with 1005 but may not with 1009: an ASN ban is about whose network you’re on, so a home ISP’s network gets past it. A country ban is about where the IP is, so a home IP in the wrong country still fails. With 1009, what matters is the country you exit from.
For site owners:
- Allow wins over Block in IP Access rules. An allowed IP or ASN also skips custom rules, rate limiting and WAF managed rules. A country on the allow list skips only the first two.
- A rule can apply to one site or every site in the account. Check both places.
- No rule at all? One Free-plan owner on Cloudflare’s forum found none, and a Skip rule changed nothing. One community member pointed out the site ran on Kajabi, a hosted platform that sits on Cloudflare, and said to ask Kajabi. So check your host too.
Paste this into your AI
A website behind Cloudflare shows me "Access denied" with error <1005 / 1006 / 1007 / 1008 / 1009>.
The page says: <paste the full text, incl. the value in brackets: ASN number, IP address or country code>.
Explain in plain words what this code means and who set the block.
Then list the likely causes in order, most likely first. For each, give one way to test it and one fix.
My setup: <browser or language + library>, <the URL pattern>, <where my IP comes from: home, office,
VPN or WARP, cloud server (which provider), proxy type + country>, <do I own this site on Cloudflare: yes / no>.
Tell me if waiting or retrying can help, and what to change on my side.Dev details
All of these come back as HTTP 403. Cloudflare calls this page type an IP/Country block (API id ip_block).
The HTML page for 1005, as one visitor quoted it:
Error 1005 Access Denied
The owner of this website (<host>) has banned the autonomous system number (ASN)
your IP address is in (<asn>) from accessing this website.
For 1006, as quoted on Cloudflare’s forum thread:
Error 1006 Ray ID: <ray id> • <date> UTC
Access denied
What happened?
The owner of this website (<host>) has banned your IP address (<ip>).
And 1009, again from Cloudflare’s forum:
Error 1009 Ray ID: <ray id> • <date> UTC
Access denied
What happened?
The owner of this website (<host>) has banned the country or region your IP address is in (XX)
from accessing this website.
Cloudflare Ray ID: <ray id> • Your IP: <ip> • Performance & security by Cloudflare
Skip the HTML and ask for JSON. Send Accept: application/json and Cloudflare answers with a structured error on every plan, Free included, except when the site set its own custom error rules:
const res = await fetch(url, { headers: { ...headers, Accept: "application/json" } });
const BANS = { 1005: "ASN", 1006: "IP", 1007: "IP", 1008: "IP", 1106: "IP", 1009: "country" };
if (res.status === 403 && (res.headers.get("content-type") ?? "").includes("json")) {
const e = await res.json();
if (e.cloudflare_error && BANS[e.error_code]) {
// Owner ban by ASN, IP or country. Not retryable: change network / IP / country, don't retry.
console.log(`banned by ${BANS[e.error_code]}`, e.error_code, e.ray_id, e.what_you_should_do);
}
}
Per Cloudflare’s docs, these fields are worth reading:
| field | what it tells you |
|---|---|
error_code |
the number: 1005, 1006, 1009 … |
error_category |
access_denied for 1005 to 1008 (Cloudflare’s table doesn’t list 1009) |
retryable |
whether a retry can help; only 6 codes in the 1xxx range are retryable, none of these |
cloudflare_error |
always true: Cloudflare made the reply, not the site’s server |
ray_id |
the ID the owner searches in Security Events |
A few edge cases:
- The number may not match the cause. Cloudflare’s own docs disagree. The per-code pages say 1005 = ASN, 1006 = IP, 1009 = country. Its error page guide says an IP Access rule on countries or IPs gives a 1005. Read the words and the value in brackets rather than just the number.
- Many country blocks never say 1009. Blocking by country in IP Access rules is Enterprise only, so other plans block countries with WAF custom rules, and those show the WAF block page instead (“Sorry, you have been blocked”, see 1020).
- Custom pages. The owner may restyle the IP/Country block page, so the words above may be missing, but the 403 stays.
- A challenge, not a ban. IP Access rules can also challenge by IP or country. Then you see the IP/Country challenge page (also 403), or the “Just a moment” check, not 1005 to 1009.
- Neighbours. 1010 bans your browser’s signature. 1015 is a rate limit that lifts by itself.
Why match on the code, not the category: 1009 isn’t in Cloudflare’s access_denied examples, and the legal category also mentions “country blocks” (codes 1026 and 1039). A check on error_category === "access_denied" alone may miss 1009.
A custom rule that blocks by ASN, continent or country looks like this, from Cloudflare’s own example:
(ip.src.asnum eq 131279) or (ip.src.continent eq "AS") or (ip.src.country eq "KP")
Action: Block. With no custom reply, that gives the WAF block page, not 1005 or 1009. Same idea, but a different page.
Numbers worth knowing for owners: each Cloudflare account can keep up to 50,000 IP Access rules, on every plan. IP Access rules set to Allow don’t show up in Security Events.
Open questions
Cloudflare’s docs don’t say how 1006, 1007, 1008 and 1106 differ. They share one page and one answer.
Why it matters little: all four mean the owner banned your IP, and none of them has a timer. Change the IP and its range, or ask the owner. Your code can treat them as one case.
What to keep when you hit one: the code, the value in brackets, the Ray ID and the UTC time on the page. Cloudflare tells owners to search Security Events by Ray ID or client IP. Those few lines are what an owner needs to find the rule and lift it. Without them, your email is a guess.
Questions
Can Cloudflare support unblock me?
No. The site owner set the ban. Cloudflare's docs say its support cannot override a customer's security settings. Ask the owner, with a screenshot of the error page.
Will error 1005, 1006 or 1009 go away if I wait?
Not on a timer. Cloudflare marks these codes as not retryable, and they carry no Retry-After header. The ban stays until the owner changes the rule, or you come from another network, IP or country.
Why do I get error 1009 only with WARP or a VPN on?
The site checks the country of the IP it sees. With WARP or a VPN on, that is the exit IP, not yours. One visitor saw 1009 with code XX (unknown) only while WARP was on.
I get error 1005 on a VPN. Why?
The site sees the VPN's exit IP, and it can ban that whole network by its ASN. On a 1005 thread about Crunchyroll, one user said the site had blocked all DigitalOcean IPs and advised switching VPN providers.
scrapenews difficulty
24/100 · Easy from 3 of 8 factors
| Factor | What we found | Source |
|---|---|---|
| Smallest client that gets through | a plain HTTP client | scrapingbee.com |
| Checks stacked | IP reputation | developers.cloudflare.com |
| Scraper API credits | 25 credits per request (a plain request is 1) | scrapingbee.com |
Our analysis of 3 sourced facts; measured runs replace them as they come. How we rate difficulty
Related
Sources
Cloudflare docs: Error 1005 (ASN banned) developers.cloudflare.com
Cloudflare docs: Error 1006, 1007, 1008 or 1106 (IP banned) developers.cloudflare.com
Cloudflare docs: Error 1009 (country or region banned) developers.cloudflare.com
Cloudflare docs: IP Access rules (availability, country block on Enterprise only) developers.cloudflare.com
Cloudflare docs: IP Access rules parameters (IP, range, ASN, country, T1, XX) developers.cloudflare.com
Cloudflare docs: IP Access rules actions developers.cloudflare.com
Cloudflare docs: Create an IP access rule (one site or all sites in the account) developers.cloudflare.com
Cloudflare docs: Troubleshoot Error Pages (which block shows which page) developers.cloudflare.com
Cloudflare docs: Error page types (IP/Country block, 403) developers.cloudflare.com
Cloudflare docs: Block traffic by geographical location (custom rule) developers.cloudflare.com
Cloudflare docs: Error responses (JSON, error categories, Retry-After) developers.cloudflare.com
Cloudflare docs: IP geolocation (accuracy, correction form) developers.cloudflare.com
r/Crunchyroll: Help - Error 1005 Access Denied (full 1005 message) reddit.com
Cloudflare Community: Error #1006 Code (full 1006 message, Oct 2026) community.cloudflare.com
Cloudflare Community: Need help finding/removing IP ban causing Error 1006 community.cloudflare.com
Cloudflare Community: Error 1009, newly assigned CIDR is in country XX community.cloudflare.com
Cloudflare Community: Message error 1009 (WARP on) community.cloudflare.com