# Check geographic restrictions

- Check 31.13 · AI crawler access and data policy · Critical
- Source: https://checklist-seo-geo.com/en/ai-crawler-access-data-policy/check-geographic-restrictions
- Check that your country blocks, IP-based redirects and data center filters do not shut the door on search engine crawlers and AI crawlers.
- Updated on 2026-11-25
- Licence: CC BY 4.0. Credit “Checklist SEO & GEO” with a link to https://checklist-seo-geo.com/en/ai-crawler-access-data-policy/check-geographic-restrictions.
- Plugin checklist-seo-geo: 1.3.1 · https://github.com/maximegaul/checklist-seo-geo

## In short

Search engine and generative engine crawlers explore the web from data centers, most often outside France. A country block, a forced redirect based on the IP address or a filter against cloud hosting providers can therefore shut them out without anyone noticing. This check consists of identifying every active geographic restriction, testing the site from abroad and exempting verified bots from rules that target them by accident.

## Why it matters

A geographic restriction decides the fate of a request based on the country associated with its IP address. But crawlers do not come from your customers' country.

- **Googlebot**: Google states that its default IP addresses appear to be based in the United States, even though it also crawls from other countries. It asks you to treat Googlebot like any other visitor from the country it appears to come from.
- **AI crawlers**: OpenAI, Perplexity and Anthropic publish their IP ranges. They belong to cloud hosting providers, and nothing guarantees they are geolocated in your market.
- **On-demand fetching**: when a French user asks ChatGPT, Perplexity or Claude to read one of your pages, the request comes from the vendor's servers (ChatGPT-User, Perplexity-User, Claude-User), not from the user's computer. A site open “to France only” therefore refuses that read.

Four mechanisms produce the same effect:

1. **Country blocking** in the firewall, the CDN (Content Delivery Network) or a security plugin, often set up after an attack and never removed.
2. **Forced IP-based redirect**: the crawler coming from the United States is sent to the American or international version and never sees the others.
3. **Data center blocking**: a “deny hosting providers” or “deny this autonomous system” rule targets malicious bots and catches legitimate crawlers, which run on the same clouds.
4. **Content that varies by country**: prices, availability or legal notices change according to the IP, and the search engine only indexes the variant it saw.

## What it improves

- **Crawling**: search engine crawlers and AI crawlers reach your pages wherever they start from.
- **International indexing**: each language or country version remains crawlable at its own URL, without depending on the crawler's IP.
- **Live fetching by AI assistants**: user-triggered reads succeed. Direct effect on the assistant's ability to rely on your page, with no guarantee of a citation.
- **Security preserved**: you keep your country blocks for unverified traffic, exempting only bots authenticated by their IP.
- **Diagnosis**: you can finally explain “403” errors that never show up from your office.

## How to check

**1. Test from abroad.** From a server or a VPN located in the United States:

```bash
curl -s -o /dev/null -w "%{http_code} %{size_download} bytes -> %{redirect_url}\n" https://example.com/
```

Compliant result: `200`, a size identical to the one obtained from France, no redirect. Without a server abroad, use a distributed probe service such as Globalping (free web interface at `globalping.io`): choose the HTTP measurement and the United States as the starting point.

**2. Use the search engines' infrastructure.** The [URL Inspection](https://search.google.com/search-console?action=inspect) tool in Google Search Console (“Test live URL”) and [its counterpart](https://www.bing.com/webmasters/urlinspection) in Bing Webmaster Tools send a real request from the search engine's addresses. An access error or a page different from the one you see indicates filtering.

**3. Read the logs by crawler.** A crawler allowed in robots.txt that only receives 403s or 302s is a strong clue. See [analyze AI crawler logs](https://checklist-seo-geo.com/en/ai-crawler-access-data-policy/analyze-ai-crawler-logs).

**4. Geolocate the official ranges with your own database.** Your GeoIP database is what decides, not the actual location. List a crawler's ranges:

```bash
curl -s https://openai.com/searchbot.json | jq -r '.prefixes[] | .ipv4Prefix // .ipv6Prefix'
```

Then query the database used by your server for an address in the range:

```bash
mmdblookup --file /usr/share/GeoIP/GeoLite2-Country.mmdb --ip 66.249.66.1 country iso_code
```

If the country returned is on your block list, the crawler is refused.

**5. Inventory the rules.** Review each layer listed under “How to implement” and note any rule that mentions a country, a continent or an autonomous system.

## How to implement

### Before you start

Three principles apply to every environment:

- **Never redirect based on IP.** Offer a banner or a country selector, and keep each version accessible at its own URL. See [avoid forced IP-based redirects](https://checklist-seo-geo.com/en/international-architecture/avoid-forced-ip-based-redirects).
- **Exempt verified bots, not user agents.** An exception based on the crawler's name can be spoofed in one line. Rely on your CDN's verified bots or on the official address lists: see [verify crawler identity against official IP ranges if possible](https://checklist-seo-geo.com/en/ai-crawler-access-data-policy/verify-crawler-identity-against-official-ip-ranges-if-possible).
- **If a country must remain blocked for a legal reason** (licensing, regulation), the crawler that appears to come from it must be blocked too: that is Google's guidance. In that case, do not create an exception.

The examples below block two fictitious countries, `XX` and `YY`: replace them with the two-letter ISO codes of your actual rules.

### Apache

Versions: Apache 2.4, `mod_maxminddb` module 1.2 and later.

Country blocking relies on `mod_maxminddb` and a GeoLite2 database. The following configuration blocks the listed countries except for the addresses of verified bots, read from an include file:

```apache
MaxMindDBEnable On
MaxMindDBFile COUNTRY_DB /usr/share/GeoIP/GeoLite2-Country.mmdb
MaxMindDBEnv MM_COUNTRY_CODE COUNTRY_DB/country/iso_code

SetEnvIf MM_COUNTRY_CODE ^(XX|YY)$ pays_bloque

<Directory "/var/www/example">
    <RequireAny>
        <RequireAll>
            Require all granted
            Require not env pays_bloque
        </RequireAll>
        Include /etc/apache2/robots-verifies-require.conf
    </RequireAny>
</Directory>
```

The `/etc/apache2/robots-verifies-require.conf` file contains one `Require ip …` line per official range; how to generate it automatically is described in the guide on IP validation. Also look for old country lists pasted into a `.htaccess` file:

```bash
grep -cE "^(Deny from|Require not ip)" /var/www/example/.htaccess
```

A result of several hundred lines gives away a country block list generated by an online tool and never updated.

```bash
sudo apachectl configtest && sudo systemctl reload apache2
```

### Nginx

Versions: Nginx 1.18 and later (including stable 1.30 and mainline 1.31), `ngx_http_geoip2_module` module 3.x.

With the `ngx_http_geoip2_module` module (`libnginx-mod-http-geoip2` package on Debian and Ubuntu), in the `http` context:

```nginx
geoip2 /usr/share/GeoIP/GeoLite2-Country.mmdb {
    $geoip2_country_code country iso_code;
}

map $geoip2_country_code $pays_bloque {
    default 0;
    XX      1;
    YY      1;
}

geo $robot_verifie {
    default 0;
    include /etc/nginx/robots-verifies.geo;
}

map "$pays_bloque:$robot_verifie" $refus_geographique {
    default 0;
    "1:0"   1;
}
```

Then in the `server` block:

```nginx
if ($refus_geographique) {
    return 403;
}
```

The `/etc/nginx/robots-verifies.geo` file contains one `RANGE 1;` line per official range. Reload with `sudo nginx -t && sudo systemctl reload nginx`.

### Cloudflare

Versions: Cloudflare dashboard, all plans, November 2026.

Open [`Security > Security rules`](https://dash.cloudflare.com/?to=/:account/:zone/security/security-rules) (`Security > WAF > Custom rules` in the old navigation) and look for rules whose expression contains `ip.src.country`, `ip.src.continent` or `ip.src.asnum`. Add the verified bot exemption:

```txt
(ip.src.country in {"XX" "YY"} and not cf.client.bot)
```

Action: `Block`. The `cf.client.bot` field is true for bots Cloudflare has verified: Googlebot, Bingbot and some of the AI crawlers. Not all of them are included, and the list changes: check each crawler's status in the Cloudflare Radar bots directory, and add an official address list if needed.

Also check IP access rules (`Security > Security rules`, then `Create rule > IP access rules`; `Security > WAF > Tools` in the old navigation), which can block or challenge an entire country and apply with no possible exception: replace them with a custom rule like the one above. Finally, in [`Security > Analytics`](https://dash.cloudflare.com/?to=/:account/:zone/security/analytics), `Events` tab (`Security > Events` in the old navigation), filter on the country “United States” and the action “Block” to see what is being refused today.

### AWS

Versions: Amazon CloudFront and AWS WAF (WAFV2) consoles, November 2026.

**CloudFront** offers geographic restrictions ([CloudFront console](https://console.aws.amazon.com/cloudfront/v4/home), the distribution's `Security` tab, allow list or block list by country). They allow no exceptions: a crawler coming from a blocked country receives a 403. If you need to exempt crawlers, disable them and use AWS WAF instead.

**AWS WAF** ([console](https://console.aws.amazon.com/wafv2/homev2)): create an IP set with the official ranges, then a rule that blocks the targeted countries except for those addresses:

```json
{
  "Name": "blocage-pays-sauf-robots-verifies",
  "Priority": 20,
  "Statement": {
    "AndStatement": {
      "Statements": [
        {
          "GeoMatchStatement": {
            "CountryCodes": ["XX", "YY"]
          }
        },
        {
          "NotStatement": {
            "Statement": {
              "IPSetReferenceStatement": {
                "ARN": "arn:aws:wafv2:us-east-1:123456789012:global/ipset/robots-verifies/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111"
              }
            }
          }
        }
      ]
    }
  },
  "Action": { "Block": {} },
  "VisibilityConfig": {
    "SampledRequestsEnabled": true,
    "CloudWatchMetricsEnabled": true,
    "MetricName": "blocage-pays-sauf-robots-verifies"
  }
}
```

### Google Cloud

Versions: Google Cloud Armor, backend security policies, November 2026.

In Cloud Armor, geographic rules use the `origin.region_code == 'XX'` expression. Add a higher-priority allow rule for verified bot ranges, or remove the country concerned.

### Azure

Versions: Azure Front Door Standard and Premium, WAF policy, November 2026.

In the Azure Front Door WAF policy, geo-filtering custom rules list the denied countries. Add a higher-priority allow rule based on the crawlers' IP ranges.

### Plesk

Versions: Plesk Obsidian 18.0.52 and later, Firewall extension 2.0 (Linux).

The Plesk firewall (`Tools & Settings > Firewall`) accepts country rules. Also check the domain settings (`Websites & Domains > example.com > Hosting & DNS > Apache & nginx`): Plesk for Linux's IP geolocation blocking is configured there, and a GeoIP block may have been pasted in by hand in the additional directives.

### cPanel

Versions: cPanel & WHM 110 and later; CSF in the version maintained by cPanel since February 2026.

cPanel's “IP Blocker” does not handle countries, but the server firewall can: with CSF (ConfigServer Security and Firewall), the administrator defines the denied countries in WHM (`CC_DENY` and `CC_ALLOW_FILTER` options). The original vendor, ConfigServer, shut down on August 31, 2025; since February 2026, cPanel has distributed its own version of CSF, which keeps these options. On hosting you do not administer, ask support whether country filtering is active.

### Shared hosting

Look for a geoblocking option in the hosting provider's customer area and for an address list in the `.htaccess` file. If you have no control over the firewall and a country block is essential to you, put the site behind Cloudflare and manage the rule there, with the verified bot exemption.

### Vercel

Versions: Vercel Firewall, all plans, November 2026.

In the project's `Firewall` tab, custom rules can filter by country. Review them and check in the firewall log that crawler requests are not denied.

### Netlify

Versions: `_redirects` file, all Netlify plans, November 2026.

Conditional redirects by country are written in the `_redirects` file:

```txt
/  /fr/  302  Country=fr
```

A crawler coming from the United States does not follow this rule and stays on the default version. Make sure each version is also linked in the HTML and declared in hreflang, so that you do not depend on this redirect.

### WordPress

Versions: WordPress 6.4 and later (including 7.x), WooCommerce 8 and later, plugins mentioned in their November 2026 versions.

- **Security plugins**: country blocking in Wordfence Premium, iQ Block Country or IP2Location Country Blocker applies to every visitor, crawlers included. Check the list of countries and the option to exclude search engine crawlers when it exists.
- **Multilingual plugins**: disable automatic redirection based on the browser language or the IP (WPML, Polylang, Weglot). Googlebot does not send an `Accept-Language` header.
- **WooCommerce**: the geolocation-based “Default customer location” setting changes the taxes and prices displayed according to the IP. The crawler sees the variant for its apparent country.

### Shopify

Versions: Shopify Markets, all plans, November 2026.

Automatic redirection by country or language is set in `Online Store > Preferences`, in the “Automatic redirection” section. Leave it disabled and offer the theme's country and language selectors or a recommendation banner instead. Shopify's Geolocation app, which displayed that banner, was retired on March 24, 2025: use a third-party app from now on. Firewall country filtering cannot be configured on Shopify.

### Laravel

Versions: Laravel 10 to 13.

If a middleware redirects based on the IP or the browser language, limit it to the home page and the first visit, or replace it with a suggestion displayed on the page. Never return a country-based 403 from the application: that rule belongs in the firewall, where it can exempt verified bots.

## Common mistakes

- **Blocking the United States “because we only sell in France”**: this is the most costly block, since Googlebot and most AI crawlers appear to come from there.
- **Exempting on the user agent**: any script can present itself as Googlebot to get around your geoblocking.
- **Blocking entire autonomous systems** (cloud hosting providers) without exception: AI crawlers are hosted there.
- **Forgetting rules set up in an emergency**: a country block added during an attack stays active for years.
- **Serving different content to the crawler to work around the problem**: showing the crawler what a user from its country would not see is [cloaking](https://checklist-seo-geo.com/en/practices-avoid/eliminate-deceptive-cloaking).
- **Testing from the office**: you are in the allowed country, so the test proves nothing.
- **Stacking layers**: a country unblocked in Cloudflare can remain blocked by the WordPress plugin or the server firewall.

## Frequently asked questions

### Does blocking the United States prevent Googlebot from crawling my site?

Yes, very likely: Google states that Googlebot's default IP addresses appear to be based in the United States, and asks you to treat it like any other visitor from the country it appears to come from. Blocking the United States therefore refuses Googlebot and most AI crawlers, which also appear to come from there. Exempt verified bots, or remove that country from the list.

### Can ChatGPT read my site if it is open to France only?

Not necessarily: when a French user asks ChatGPT, Perplexity or Claude to read a page, the request comes from the vendor's servers, not from the user's computer. If your GeoIP database does not place these addresses in France, a site open “to France only” refuses the read. Exempt these crawlers, verified by their official addresses, from the geographic rule.

### Should visitors be redirected automatically based on their country?

No, an automatic redirect based on the IP address sends a crawler coming from the United States to a single version, and it never sees the others. Offer a banner or a country selector instead, keep each version accessible at its own URL, link them in the HTML and declare them in hreflang. Search engines can then crawl every version of the site.

### Can a country block be kept for legal reasons?

Yes. If a country must remain blocked for a legal reason, such as licensing or regulation, the crawler that appears to come from it must be blocked too: that is Google's guidance. In that case, do not create an exception for verified bots. Serving the crawler what a user from its country would not see would amount to cloaking.

## Resources

- [Google: locale-adaptive pages and geo-distributed crawling](https://developers.google.com/search/docs/specialty/international/locale-adaptive-pages)
- [Google: verifying Googlebot and other Google crawlers](https://developers.google.com/search/docs/crawling-indexing/verifying-googlebot)
- [OpenAI: crawlers and IP ranges](https://developers.openai.com/api/docs/bots)
- [Perplexity: crawlers and firewall configuration](https://docs.perplexity.ai/docs/resources/perplexity-crawlers)
- [Anthropic: Claude's crawlers](https://support.claude.com/en/articles/8896518)
- [Cloudflare: verified bots](https://developers.cloudflare.com/bots/concepts/bot/verified-bots/)
- [Amazon CloudFront: restricting the geographic distribution of your content](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/georestrictions.html)
- [Nginx: geo module](https://nginx.org/en/docs/http/ngx_http_geo_module.html)

Next steps: [check CDN, Cloudflare and WAF](https://checklist-seo-geo.com/en/ai-crawler-access-data-policy/check-cdn-cloudflare-waf) and [check rate limits](https://checklist-seo-geo.com/en/ai-crawler-access-data-policy/check-rate-limits).
