You open a link to an online shop, a local news site or a booking page, and instead of the page you get a plain white screen with two lines in large type: "Error 1009" and "Access denied". Underneath, a sentence says the owner of the website has banned the country or region your IP address is in. You may be at home, in the same country as the shop, wondering why a site that worked last week now thinks you are somewhere else. Or you may be travelling and trying to reach a service you use every day at home.
This post explains what Error 1009 means, who set the rule and how Cloudflare decides which country you are in. It covers why that country is sometimes wrong, what you can do as a visitor without breaking the site's rules, and what a site owner can check in the Cloudflare dashboard. The last part is for site owners and QA teams who test their own country rules.
What is Cloudflare Error 1009?
Error 1009 is the page Cloudflare shows when a site owner's rule blocks the country or region a request comes from. Cloudflare sits in front of many websites as a network layer: your browser talks to Cloudflare first, and Cloudflare passes the request on to the site's own server. One of the controls site owners get with that layer is a rule that says "do not let in visitors from these countries".
Cloudflare's Error 1009 documentation states the cause plainly: the site owner has banned the country or region your IP address is in. Its advice to visitors is to contact the site owner; its advice to site owners is to check their IP Access Rules.
The number 1009 is not an HTTP status code. Cloudflare labels the error pages it generates with numbers in the 1000s and shows that number in the page body. The status code your browser receives with Error 1009 is 403 Forbidden.
What does the Error 1009 page tell you?
The page is short, but each line answers a question you will have when you ask for help:
| Line on the page | What it tells you |
|---|---|
| Access denied | The request was refused on purpose; the site is not down |
| Error 1009 | The reason is a country or region rule, not your speed or browser |
| "has banned the country or region your IP address is in" | The rule looks at the country linked to your IP address |
| Ray ID | An identifier for your request that the site owner can look up |
| Your IP | The address the site saw; on some pages you click to reveal it |
Two details matter. The rule was written by the website's owner, so Cloudflare support cannot lift it for you. And the page talks about your IP address's country, not about where you are standing. Those two are usually the same, but not always, and most fixable cases of Error 1009 live in the gap between them.
Why do websites block whole countries?
Site owners rarely block a country out of hostility. The usual reasons are practical, legal or commercial:
- Licensing. Video, music, sports streams and software are often licensed country by country, and a site that holds rights for one market may have to keep others out.
- Law and regulation. Online gambling, some financial services and medicines are licensed per country. A company without a licence in a country often blocks it rather than risk breaking local law.
- Sanctions and export controls. Companies must follow the trade sanctions of the countries where they operate, and blocking traffic from sanctioned countries is one way they do it.
- Fraud and abuse. A small shop that sells only at home may see most of its fake orders and login attacks from countries where it has no customers, and close those countries entirely.
- Market reach. A shop that ships to one country or a regional newspaper may simply not want traffic it cannot serve.
The same logic shows up outside Cloudflare too, in video players that say a title is not available in your country and shops that redirect you to a local version. The wider picture, including what EU law allows, is in What Is Geo-Blocking and How Do Sites Know Your Location?.
How does Cloudflare decide which country you are in?
Cloudflare looks up your IP address in its IP geolocation data and compares the result with the site owner's rule. Every step happens before the site's own server sees anything:
- Your request reaches a Cloudflare data center, usually the one closest to you on the network.
- Cloudflare reads the source IP address. That is the address of whatever connects to Cloudflare: your router, your mobile carrier's exit point, your VPN server or your company's gateway.
- The address is matched to a country. Cloudflare's IP geolocation documentation says the database is updated several times a week. Besides ordinary country codes there are two special ones:
XXfor clients without country data andT1for clients on the Tor network. - The owner's rule is checked. If the country is on the block list, or missing from the allow list, the rule matches.
- The 1009 page is returned with a 403 status and a Ray ID. The site's own server never receives the request.
The data center and the country are separate things. Being served by a data center in a neighbouring country does not make Cloudflare think you are there; the country comes from the address lookup.
Why does Cloudflare think I am in another country?
Because an IP address carries no location of its own. The country is an estimate taken from a database, and several everyday situations make it point somewhere else:
- A VPN or proxy you forgot about. A VPN app that starts with the computer, a browser extension or a leftover proxy setting sends your traffic out through another country.
- A company network or work VPN. Many companies route staff traffic through a gateway in their head office country, so a work laptop may appear to be abroad all day.
- Roaming on mobile data. Abroad, mobile data may leave through your home carrier's network or a local partner's, so the country a site sees can differ from where you are.
- Mobile carriers and CGNAT. Carriers put many subscribers behind shared public addresses and move address blocks between regions, and database records can lag behind.
- An outdated database record. Address blocks are sold and moved between companies and countries. Until the databases catch up, the new users of a block inherit the old country.
If several sites show the same wrong country, the record for your address is probably off. How these databases are built and why they miss is covered in Why Is My IP Location Wrong? What an IP Address Reveals.
How do you check which country your connection shows?
Open a "what is my IP" page and look at the country, then check a second one, because services use different databases. For Error 1009, Cloudflare's own view is what counts, and there is a simple way to see it.
Advanced: every domain on Cloudflare answers on the path /cdn-cgi/trace. Cloudflare documents it as a way to find the data center that served you, and the plain-text answer also includes a loc= line with a two-letter country code. Open it in the browser on any Cloudflare site, or run:
curl -s https://www.cloudflare.com/cdn-cgi/traceOn our test machine the answer listed, among other lines, colo= with a three-letter data center code and loc= with a two-letter country code. Cloudflare's reference does not describe every line, so treat loc= as a quick check, not an official record. If it shows a country you are not in and no VPN or proxy is on, you have found the cause.
What can you do as a visitor?
Work through these steps in order; the first three solve most cases where the country is wrong:
- Check the address. Some companies run a separate site per country, and the one you clicked may not be meant for your market.
- Turn off any VPN or proxy. Close the VPN app, disable proxy extensions, check the system proxy setting and reload. On a work device, ask IT which country your traffic leaves from.
- Compare networks. Try home Wi-Fi, then mobile data. If one works and the other shows Error 1009, the problem is one connection's country record, not your device.
- Write to the site owner, not Cloudflare. Include the Ray ID, the time, the country you are actually in and the IP address shown on the page. If you are in a country the site serves, the owner can check the rule or add an exception.
- Report a wrong location. Cloudflare has its own correction form, linked from its geolocation documentation, and database companies such as MaxMind accept requests through a public data correction form. Tell your internet provider too, since it owns the address block.
- Use the official route. If the company has an app, a regional site or a support line for your country, use that instead of the blocked page.
If the country is right and the site simply does not serve it, the block is doing what its owner intended. Connecting through a VPN or proxy in another country is not a fix: it breaks the site's terms, can cost you your account and, where the reason is a licence or a sanction, puts you on the wrong side of a rule that exists for a legal reason. Ask the owner whether they plan to serve your country, or look for a service that does.
If you own the site: are your country rules blocking real customers?
If visitors report Error 1009, your country rule works; the question is whether it stops the right people. Start by finding out which control produced the page.
The 1009 page comes from the country option in IP Access Rules. Cloudflare's documentation for that feature says blocking by country there is available only on Enterprise plans, and that other plans can block countries with WAF custom rules. A custom rule that blocks a country does not show the 1009 page: the visitor gets Cloudflare's general block response with a 403 status, or your custom response if you set one. A customer's screenshot therefore tells you which tool to open.
A custom rule that lets in only the countries you serve, with an exception for your own office and monitoring addresses, looks like this in the expression editor:
(not ip.src.country in {"DE" "AT" "CH"} and not ip.src in {203.0.113.0/24})ip.src.country is the Country field with two-letter codes; 203.0.113.0/24 stands in for your own address range. Then check:
- Find the Ray ID in the logs. The Events tab on the Analytics page lists security events; filter by the Ray ID the visitor sent. Free plans see sampled logs, so a missing event does not prove the rule did not fire.
- Keep an allow list. Payment providers, uptime monitors, partners and your own staff abroad may connect from countries you block. Add their addresses as exceptions instead of loosening the whole rule.
- Decide on
XXandT1. Requests without country data and requests from Tor carry these codes; include or exclude them on purpose. - Start softer. On plans without the Log action, Cloudflare suggests running a new rule with Managed Challenge first, reviewing what it catches, then switching to Block.
- Write a useful block page. On Pro plans and above, a custom rule's Block action can return your own HTML, text, JSON or XML (up to 2 KB) with a status in the 400-499 range. Say why the site is unavailable and where to write if the location is wrong.
- Simulate before you publish. The Rules simulator in the dashboard sends a test request with a chosen source country, region and city and shows which rules match. It was in beta at the time of writing and needs an Administrator role.
How is Error 1009 different from 1020, 1006 and 1015?
All of them appear on Cloudflare pages, but each points to a different rule and a different fix:
| Error | What the rule looks at | Status | What usually helps |
|---|---|---|---|
| 1009 | The country or region of your IP | 403 | Check your country; contact the owner |
| 1020 | A security rule matched the request | 403 | Contact the owner with the Ray ID |
| 1006, 1007, 1008 | Your specific IP address or range | 403 | Another network; contact the owner |
| 1005 | The network (ASN) your IP belongs to | 403 | Another network; contact the owner |
| 1015 | Too many requests in a short time | 429 | Wait and stop refreshing |
Waiting fixes 1015; 1009 stays the same however long you wait, because your country does not change by itself. The 1020 page is explained in Cloudflare Error 1020: What Access Denied Means.
How can site owners test their country rules from other countries?
The simulator shows which rule matches; a real request from another country shows what a visitor actually gets. The second matters because caching, redirects, your application's own location logic and the custom block page all sit between the rule and the visitor's screen.
This is the one place where a proxy belongs in this topic. A QA team needs to confirm three things: visitors from blocked countries see the right page with the right status, visitors from allowed countries get in, and people who are easy to misplace, such as mobile users, are not shut out by mistake. Residential Proxy addresses belong to home internet connections, and you pick the test country and city in the panel, close to how a real visitor in that market arrives. The same setup is used to check translated pages and local prices, which we cover on our localization testing page.
A test of your own domain takes two commands, run once with a country you allow and once with a country you block:
# Which country does Cloudflare see for this exit? (your own domain)
curl -s -x "http://user:pass@pr.proxynet.io:8000" https://your-domain.example/cdn-cgi/trace
# Status line and headers (with CF-Ray); the body goes to block-page.html
curl -s -D - -o block-page.html -x "http://user:pass@pr.proxynet.io:8000" https://your-domain.example/We ran the same two commands on our test machine through a local test proxy against a Cloudflare-hosted page: the first printed the colo= and loc= lines, the second the status line, Server: cloudflare and the CF-Ray header. For a blocked country you should see a 403 and your block page; then look up that Ray ID in Events to confirm which rule fired. Use this only on sites you own or are hired to test; the purpose is to check your own rule, not to enter a site that has chosen to block your country.
Common mistakes
- Writing to Cloudflare instead of the site. Cloudflare enforces the rule but does not own it.
- Clearing cookies and reinstalling the browser. The rule looks at the IP address's country, so browser changes do nothing.
- Leaving a VPN on and forgetting it. It is the most common reason people at home see a ban meant for another country.
- On the owner side: blocking without an allow list. Payment callbacks, monitors and travelling staff fail first.
- On the owner side: a bare 403 with no explanation. A short custom page with a contact address turns a dead end into a support request you can act on.
Decision guide
| Your situation | What to do |
|---|---|
| You see 1009 at home and a VPN or proxy is on | Turn it off and reload |
| You see 1009 only on a work laptop | Ask IT which country your traffic leaves from |
loc= and IP check sites show the wrong country | Report it to the database companies and your provider |
| You are abroad and need a service from home | Contact the service; use its official app or support line |
| You are in a country the site does not serve | Respect the block; ask the owner or use another service |
| Customers report 1009 on your site | Find the Ray ID in Events; add allow-list exceptions |
| You need to test your own rules from abroad | Simulate first, then test end to end from that country |
Frequently asked questions
Is Error 1009 a ban on me personally?
No. The rule concerns the country your IP address is linked to, not you, your device or your account. Anyone connecting from the same country sees the same page.
How long does Error 1009 last?
As long as the site owner keeps the rule; unlike the rate limit behind Error 1015, there is no timer. If the cause is a wrong country record, it ends when the record is corrected, and Cloudflare says confirmed corrections are generally applied within a few business days.
Can Cloudflare remove the block for me?
No. Cloudflare enforces rules that site owners write and does not choose which countries are blocked. Contact the site owner and include the Ray ID from the page.
Why do I get Error 1009 on Wi-Fi but not on mobile data?
The two connections leave from different IP addresses, and each address has its own country record. One of them is probably placed in the wrong country, or goes through a VPN or a work gateway. Report the wrong one to its provider.
Is error 1009 in other apps the same error?
Not necessarily. Many apps and devices use the number 1009 for their own errors, which have nothing to do with Cloudflare. The Cloudflare one is a web page that says "Access denied", mentions your country or region and shows a Ray ID.
Should I use a VPN or proxy to get around Error 1009?
No. If the country is wrong, turn off any VPN you have on and get the record corrected. If the country is right, the owner has chosen not to serve it, often for licensing, legal or sanctions reasons, and entering through another country breaks the site's terms and can get your account closed.
Summary
Error 1009 is Cloudflare's "Access denied" page for a country or region rule written by the site owner, sent with a 403 status. The country comes from an IP geolocation lookup, which a forgotten VPN, a work network, roaming or an old database record can get wrong. Visitors check their country, turn off intermediaries, report wrong records and contact the owner with the Ray ID; when the country is right, the decision is the owner's. Site owners keep an allow list, explain the block on a custom page and test their rules before and after publishing; for testing your own site from other countries, take a look at our proxy services.




