Skip to content
Cloudflare error pages · error message

Cloudflare: Error 1009: Country or region banned

Policy / accountBlocked by the site's security rules

Last verified

The exact message
Error 1009: Access denied: Country or region banned

What it means

Error 1009 means the site owner has blocked the country or region associated with your IP address. Cloudflare determines location from the connecting IP, so the block applies to where the request appears to come from, not where you are.

For automation, this commonly appears when a job runs in a cloud region in another country than the person who wrote it. A script developed on a laptop in one country and deployed to a server in another can start receiving 1009 without any code change.

For the site owner, the block comes from an IP Access rule or a custom rule that matches on country. Cloudflare's guidance is to make sure the reported IP address is allowed under IP Access rules if the block was unintended.

What it looks like

$ curl -s https://www.cloudflare.com/cdn-cgi/trace | grep loc
loc=DE

Why it happens

  • The owner blocks the country of your IP with an IP Access rule or WAF custom rule.
  • Your automation runs in a cloud region located in a blocked country.
  • IP geolocation databases place your IP in a different country than expected.
  • A corporate network or VPN egresses in another country.

How to fix it

  1. Check which country your requests come from, for example by requesting /cdn-cgi/trace on any Cloudflare site and reading the loc field.
  2. If your job runs in an unintended region, deploy it to a region in your own country.
  3. Visitors: contact the site owner and ask them to allow your IP address.
  4. Respect the restriction; do not use infrastructure in another country specifically to evade it.
  5. Site owners: review country rules in IP Access rules and custom rules, and allowlist specific partner IPs.

How to stop it recurring

Choose infrastructure regions deliberately and record them. Site owners: prefer challenges over blanket country blocks where possible, and publish a contact route for legitimate users caught by the rule.

Official documentation: developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-1xxx-errors/error-1009. See all Cloudflare error messages.

Related errors

Definitions

Quick answers

What does "Error 1009: Country or region banned" mean in Cloudflare?

Error 1009 means the site owner has blocked the country or region associated with your IP address. Cloudflare determines location from the connecting IP, so the block applies to where the request appears to come from, not where you are. For automation, this commonly appears when a job runs in a cloud region in another country than the person who wrote it.

How do I fix "Error 1009: Country or region banned"?

1. Check which country your requests come from, for example by requesting /cdn-cgi/trace on any Cloudflare site and reading the loc field. 2. If your job runs in an unintended region, deploy it to a region in your own country. 3. Visitors: contact the site owner and ask them to allow your IP address. 4. Respect the restriction; do not use infrastructure in another country specifically to evade it. 5. Site owners: review country rules in IP Access rules and custom rules, and allowlist specific partner IPs.

Retries and timeouts without writing the loop

Autonoly's HTTP Request node and browser steps have per-node retries, timeouts and continue-on-fail, so a transient 429 or 503 can back off instead of failing the run. It has no proxies or IP rotation: if a site blocks automated traffic, that block applies to Autonoly too.

Also see Error handling in workflows.