Cloudflare error 1009: this country or region is banned
Error 1009 means the owner of the website has blocked the country or region your IP address is in. Through a proxy, that is the country of the exit, which may not be the country you asked for or the one you are sitting in. Cloudflare returns HTTP 403. The block is the owner's decision about where they do business.
Reviewed by John Hale. Last updated .
What it looks like
Error 1009
Access Denied: Country or region bannedHTTP/2 403
server: cloudflare
cf-ray: ...What does error 1009 mean?
Cloudflare's documentation gives one cause: the owner of the website banned the country or region of your IP address from accessing it. Cloudflare places the request in a country from the address it sees, using IP location data.
Owners block countries for licensing, sanctions and payment rules, to cut fraud, or because they simply do not sell there. Some block every country except their own.
What causes error 1009 through a proxy?
Most likely first.
- No country was set, so the exit is anywhere. A rotating proxy without a country option picks exits worldwide. Some requests land in a country the site serves and some do not, which looks like an error that comes and goes.
- The exit is not where its label says. IP location databases disagree. An address a provider lists in one country can be placed in another by the data the site uses.
- The country you chose is one the site blocks. The proxy did what you asked, and the site does not serve that country.
- The proxy was not used. If the proxy setting did not apply, the site saw the country of your own connection, VPN or cloud server.
How do you check where the site thinks you are?
Ask Cloudflare itself
Every site behind Cloudflare serves a trace page that prints the address and country Cloudflare sees.
loc=is the two-letter country code. Run it through the same proxy settings.The address and country Cloudflare seescurl -s -x http://HOST:PORT -U "USER:PASS" https://www.cloudflare.com/cdn-cgi/trace | grep -E "^ip=|^loc="Repeat it a few times on a rotating proxy
If
loc=changes between runs, your requests have no fixed country, and the ones that fail are the ones that left from a blocked one.Confirm the code
The 1XXX code and the Ray ID are in the page body of the refused request.
Status and codecurl -s -o body.html -D - -x http://HOST:PORT -U "USER:PASS" https://TARGET/ | grep -iE "^HTTP/|^server:|^cf-ray:" grep -oiE "error code: [0-9]{4}|error [0-9]{4}" body.html | head -1
What can you do about error 1009?
Set the country you are entitled to work from
If you serve customers in a country, or are checking how your own ads, prices or pages look there, pin the exit to that country so no request leaves from somewhere else.
Respect a block that is aimed at you
If the site does not serve your country, that is its decision and often its legal duty. An exit in another country changes what the site sees. It does not change the site's terms or the law that applies to you, so read both before you rely on it.
Ask the site owner
Cloudflare's resolution for visitors is to contact the owner and ask them to allow your IP address. Send the Ray ID from the error page.
If the site is yours
Check IP Access Rules and custom rules that use the country field. Cloudflare notes that blocking a country with IP Access Rules is an Enterprise feature, and points to custom rules with the country field for geoblocking.
If you use TrueProxies
Error 1009 arrives inside the tunnel and is the website's answer about the exit's country. The gateway's own refusals are 407 with a reason in X-Proxy-Reason.
Add the country to the username to pin it, for example USER-country-de. Without it, a rotating session can leave from any country in the pool. A country code the gateway has no free exit for comes back as 503 Service Unavailable, which is a coverage miss and not a block.
The country guides list measured exits per country, and the trace command above shows the country Cloudflare assigns to the exit you got. Under the acceptable use policy you are responsible for following the terms of every site you reach through the service.
Test the proxy from outside your network
The free proxy checker connects from our servers and reports the failed stage as a code, so you can tell a proxy problem from one on your computer or network.
Questions about Error 1009: Access denied (country or region banned)
What is error 1009?
A Cloudflare error that means the website's owner blocked the country or region your IP address is in. It comes with HTTP status 403.
Why do I get error 1009 only sometimes?
Your requests are leaving from different countries. A rotating proxy with no country set does this, and only the exits in blocked countries are refused.
Why am I blocked when my proxy is in an allowed country?
The site may place that address in another country. Check the loc= line of the Cloudflare trace page through the proxy to see the country Cloudflare assigns to it.
Can Cloudflare unblock my country?
No. The website's owner set the rule. Cloudflare's documentation tells visitors to contact the site owner.
Related errors
Error 1005: Access denied (ASN banned)
The site owner banned the whole network your exit is on. What an ASN is and what can change.
Error 1006: Access denied (IP banned)
The site owner banned this IP address. Also covers 1007, 1008 and 1106, which mean the same.
403 Forbidden through a proxy
Usually the website's refusal after the tunnel opened; sometimes the proxy refusing the destination.
The proxy checker error codes page maps each checker code to the stage that failed, and proxy errors explained covers timeouts and slow connections.