In short
A CDN (Content Delivery Network) answers visitors from hundreds of points of presence around the world. It can also run rules, edge functions and redirects based on the visitor's country. The task is to check that these mechanisms do not change the language served at a URL, that each language domain or subdomain reaches the right origin, and that the result is identical from several countries. Once the task is done, example.com/de/preise/ returns the same German page in Berlin, Montreal and Mountain View.
Why it matters
The CDN is the layer most often left out of tests: you test from your office, so from a single country, and always get the same response. Yet Google states that its crawlers crawl by default from IP addresses that appear to be located in the United States, in addition to addresses located elsewhere, and without an Accept-Language header. It recommends treating a crawler coming from a country like any visitor from that country, and favoring separate URLs for each version.
Typical problems:
- Geolocation rule at the edge: a Worker, a CloudFront Function or a redirect rule sends American visitors to
/en/. Googlebot, mostly American, no longer sees the other languages. See avoid forced IP-based redirects (opens in a new tab). - Cache fragmented by country: the cache key includes the visitor's country and the page changes its content (prices, language, notices) accordingly. The crawler only indexes the American variant.
- Host not passed on properly: several language domains point to the same distribution, but the origin receives its own host name and serves the default language to all of them.
- Incomplete path-based behavior: a cache or origin rule covers
/fr/*and/de/*, but not/en/*, added later. - Country-based bot protection: a challenge or a block applied to certain regions prevents one language from being crawled.
Generative engine crawlers are exposed to the same rules: they crawl from their own data centers, whose location is not always documented.
What it improves
- Indexing of each language Crawlers receive the URL's page, whatever the country of their IP address.
- hreflang Each target URL returns 200 with the announced language, with no geographic redirect.
- Citations in AI answers Each version stays readable by crawlers located in any country. Indirect effect, not guaranteed.
- Cache hit rate A key based on the URL and the host, without the country, keeps a single entry per page.
- Visitor experience A shared link opens in the same language for everyone.
How to check
1. From several countries. Globalping runs HTTP requests from probes spread around the world, for free:
globalping http example.com from Germany,France,"United States",Japan --limit 4 --method get
The result gives, for each country, the response code, the headers and the body. Compare the code, any location header and the lang attribute. To target a specific page rather than the home page, see globalping http --help, or use the form on the Globalping website. A VPN gives an equivalent result, country by country.
2. The point of presence that answered. The headers tell you: cf-ray ends with the airport code on Cloudflare, x-amz-cf-pop on CloudFront, x-served-by on Fastly. Check that several points of presence return the same language.
3. Each language host. With subdomains or country domains:
for host in example.com example.de example.co.uk; do
printf '%-18s ' "$host"
curl -s -o /tmp/page.html -w '%{http_code} ' "https://$host/"
grep -o -i '<html[^>]*lang="[^"]*"' /tmp/page.html | head -n 1
done
Each host must return 200 with its own language.
4. Headers that give away a variation. curl -sI https://example.com/de/preise/ | grep -i vary. A Vary value containing a country header (CloudFront-Viewer-Country, X-Vercel-IP-Country) or Netlify-Vary: country=… points to a page that changes by country.
5. The rules in place. In the CDN console, list every rule, function and Worker that reads the visitor's country or language.
How to implement
Before you start
Target behavior of the CDN:
| Item | Expected |
|---|---|
| Page cache key | Scheme, host, path, useful parameters; no country, no browser language, no language cookie |
| Country-based rules | No redirect or rewrite on content pages; a version suggestion on the page if needed |
Root / |
The only URL that may route the visitor, with a 302, without shared cache or with a normalized variation |
| Language domains and subdomains | Each one declared on the CDN, with a certificate, and passed to the origin with its host name |
| Path-based rules | Cover every language prefix, including the most recent ones |
| Purge | Covers every language host and prefix |
| Bot protection | Same treatment of verified bots in every region |
If the same URL really must change its content by country (prices, availability), be aware that Google may index only one variant: the lasting solution remains one URL per country, annotated with hreflang. See plan a separate URL for each language version (opens in a new tab).
Cloudflare
Versions Cloudflare dashboard, all plans (country in the cache key reserved for the Enterprise plan), November 2026.
- Country-based rules: open the Rules overview and look for expressions that use
ip.src.country(or the olderip.geoip.country) orhttp.request.headers["accept-language"]in Redirect Rules, URL Rewrite Rules and Snippets. Also check the Workers attached to the domain's routes (Workers & Pages), which often readrequest.cf.country. Limit any routing to the root/. - Country header: the IP Geolocation option (the domain's
Networktab) or the "Add visitor location headers" Managed Transform (Rules > Settings) adds theCF-IPCountryheader to requests sent to the origin. Check that the application does not use it to change a URL's language. - Cache key: the default key contains the full URL, host included. Do not add the country to it: this custom key option, reserved for the Enterprise plan, fragments the cache and makes the page vary by country.
- Language domains: each domain (
example.de) is a separate zone, with its own rules. Reproduce the same configuration on each zone and compare them rule by rule. - Purge: purge each zone; purging one zone does not affect the others.
Example of a compliant Worker, which lets every page through and only routes the root:
export default {
async fetch(request) {
const url = new URL(request.url);
if (url.pathname !== '/') {
return fetch(request);
}
const header = (request.headers.get('accept-language') || '').toLowerCase();
const lang = ['de', 'en'].find((code) => header.startsWith(code)) || 'fr';
return new Response(null, {
status: 302,
headers: {
location: `/${lang}/`,
vary: 'Accept-Language',
'cache-control': 'private, no-store',
},
});
},
};
It routes based on the browser's language, never on the country: a French-speaking visitor in Germany gets French.
AWS
Versions CloudFront console, CloudFront Functions and Lambda@Edge, November 2026.
On CloudFront, open the console and check the distribution:
- Behaviors: each language prefix must be covered by a behavior with the right origin and the right cache policy. A missing prefix falls into the default behavior (
*). - Cache policy: the
CloudFront-Viewer-Countryheader must not be part of the key for content pages. If it is, the page changes by country. - Origin request policy: if several language domains point to the same distribution and the same origin, forward the
Hostheader (managedAllViewerpolicy, or a custom policy that includesHost). Otherwise the origin receives its own name and serves the default language to every domain. - Functions: in the
Functionssection, check the CloudFront Functions and Lambda@Edge functions attached to the "Viewer request" and "Origin request" events. None of them should redirect or rewrite a content page based on the country. - Geographic restrictions:
Security > CloudFront geographic restrictionsblocks entire countries, crawlers included. Check that they are intended.
Invalidate each distribution concerned after a change.
Google Cloud
Versions Cloud CDN behind an external Application Load Balancer, Google Cloud console, November 2026.
Cloud CDN honors the origin's Vary header, but does not cache responses whose Vary contains a value outside its allowed list (Accept, Accept-Encoding, Origin and a few others), unless that header is configured as part of the cache key. A page that sends Vary: Accept-Language is therefore not cached. Prefer one URL per language, with no language Vary. Also check the custom headers added to the request sent to the origin: the {client_region} variable passed to the application must not be used to change a URL's language.
Azure
Versions Azure Front Door Standard and Premium, Azure portal, November 2026. Front Door (classic), which is being retired, is not covered.
On Azure Front Door, check that each language domain is associated with the right route, and that rule sets using a geolocation condition (client country) neither redirect nor rewrite content pages. Purge each endpoint concerned.
Fastly
Versions Fastly Deliver with custom VCL, November 2026.
Fastly honors the Vary header: an origin that sends Vary: Accept-Language on every page fragments the cache. In the custom VCL, look for conditions on client.geo.country_code in vcl_recv and remove the content page redirects or rewrites that depend on them.
Vercel
Versions Vercel platform, all plans, November 2026, with Next.js 15 and 16.
Vercel adds geolocation headers to requests, including X-Vercel-IP-Country, and supports Vary. A response cached with Vary: X-Vercel-IP-Country is stored once per country: keep this for content that is genuinely specific to a country, never for the language. Check in proxy.ts (middleware.ts before Next.js 16) and in vercel.json that no redirect depends on the country, apart from the root.
Netlify
Versions Netlify, all plans, November 2026.
Netlify can redirect by country in _redirects (Country= condition) and vary the cache by country with the Netlify-Vary: country=… header. Look for both uses:
grep -rn -E "Country=|Language=" _redirects netlify.toml 2>/dev/null
grep -rn "Netlify-Vary" _headers netlify.toml 2>/dev/null
A Country= rule on a content path (/*, /produits/*) should be removed; limit conditions to the root.
Shopify
Versions Shopify admin, all plans, November 2026.
Shopify serves stores behind its own CDN, with no settings you can change. The point to check is automatic redirection by country: Online Store > Preferences, Automatic redirection section, Country/region option. Turn it off so that each market URL stays accessible from every country, and check any geolocation apps installed.
WordPress
Versions WordPress 6.8 to 7.1, WooCommerce 10 and 11.
Geolocation plugins and WooCommerce can make a page vary by country. In WooCommerce > Settings > General, the default customer location option "Geolocate (with page caching support)" adds a v= parameter to URLs to keep cached variants apart: check that these parameterized URLs carry a canonical pointing to the URL without the parameter. If the site goes through Cloudflare or another CDN, also follow the section for that CDN.
Common mistakes
- Testing from a single country: geolocation rules go unnoticed.
- Redirecting by country at the CDN level: Googlebot, which crawls mostly from the United States, only sees the American or English version.
- Putting the country in the cache key of pages whose language is set by the URL: needless fragmentation and a risk of different content by country.
- Forgetting to pass on the host: every language domain receives the default language.
- Configuring a single zone when each language domain has its own: rules and purges drift apart.
- Blocking or challenging certain countries with no exception for verified bots: an entire language disappears from crawling. See check CDN, WAF and anti-bot protection (opens in a new tab).
Frequently asked questions
Can a CDN serve a different language depending on the visitor's country?
Technically yes, but avoid it on content pages. Google crawls mostly from American IP addresses and without an Accept-Language header: a page that changes language by country will be indexed in only one variant. Keep one URL per language, served identically everywhere, and limit any automatic routing to the site's root, with a temporary redirect and no shared cache.
How do you test a multilingual site from several countries?
Use a distributed measurement service such as Globalping, which is free and runs HTTP requests from probes located in the country of your choice, or a VPN, country by country. For each URL, compare the response code, the location header and the lang attribute. CDN headers, such as cf-ray or x-amz-cf-pop, show which point of presence answered.
Does Googlebot see the same version as my foreign visitors?
Only if the page does not depend on the country or on the browser language. Google states that its crawlers crawl by default from addresses that appear to be American, sometimes from other countries, and without an Accept-Language header. A CDN rule that redirects or rewrites by country therefore shows it the American variant. With a fixed URL per language, it sees what every visitor sees.
Do country domains behind the same CDN need specific settings?
Yes. Declare each domain on the CDN with its certificate, pass the visitor's host name to the origin so that it serves the right language, and check that the cache key contains the host. On Cloudflare, each domain is a separate zone: its rules and purges are managed separately. Test each domain with curl after every configuration change.
Resources
- Google Search Central: How Google crawls locale-adaptive pagesdevelopers.google.com
- Google Search Central: Managing multi-regional and multilingual sitesdevelopers.google.com
- Cloudflare: IP geolocation and cache keysdevelopers.cloudflare.com
- Amazon CloudFront: Control the cache keydocs.aws.amazon.com
- Google Cloud CDN: Non-cacheable content and Varydocs.cloud.google.com
- Vercel: CDN cachevercel.com
- Netlify: Caching and Netlify-Varydocs.netlify.com
- Globalping CLIgithub.com
Updated on
Topic checklist (PDF)