Skip to content

How to Tell CDN Problems from Geo-Targeting Configuration Problems

A visitor sees the wrong country version. Is the CDN serving a stale or mixed-up cache, or is the geo-targeting rule itself wrong? Here is a method to find out.

10 min readUpdated Nov 14, 2026By XPASS Editorial Team

How to Tell CDN Problems from Geo-Targeting Configuration Problems

The report arrives in a vague form: "People in Austria are seeing the German-for-Germany page, with prices in the wrong currency." Or: "Some visitors in France get the English homepage, but not all of them." Two quite different problems can produce those symptoms. In one, the geo-targeting rule is wrong: the system decides the visitor's country incorrectly, or the rule maps a country to the wrong version. In the other, the rule is fine but a cache between the visitor and your application serves the wrong stored copy.

Mixing the two up wastes time. If the cache is the problem, editing the geo rule changes nothing. If the rule is the problem, purging the cache only hides it for a while. This article describes a method to separate them, using evidence you can collect from the outside. It builds on the checks in testing country redirects and fits into the routine in tracking global campaign landing pages systematically.

The two families of problem

Geo-targeting configuration problems are about the decision. Typical examples:

  • A country is missing from a mapping and falls through to a default version.
  • A rule has the wrong priority, so a language rule overrides a location rule or the other way round.
  • The location data source is out of date or inaccurate for some address ranges.
  • The rule treats a region code or a language code as if it were a country code.
  • A stored visitor choice (a cookie) overrides detection in a way nobody intended.

CDN and cache problems are about delivery. Typical examples:

  • The cache key does not include the factor that selects the version, so the first visitor's version is stored and served to everyone.
  • A response was cached for longer than intended, so an updated rule does not take effect until the old object expires.
  • Different edge locations hold different copies, so the result varies with the route a visitor takes.
  • A redirect was cached with a permanent status and is replayed to visitors it should not apply to.
  • Response headers that control caching were removed or overwritten by an intermediate layer.

Often both exist together, and that is the hard case. A good method tries to separate the factors one at a time.

What the cache can legitimately do

A CDN stores responses and serves them to later visitors to reduce load and delay. By default a cache treats two requests as the same if they ask for the same URL, so it must be told if other things (such as country, language or device class) change the answer. The mechanism defined in RFC 9110 is the Vary response header, which lists the request headers that affect the response. Many CDNs also let you define a custom cache key that includes specific headers, cookies or a country value computed at the edge.

If the content depends on country but neither Vary nor the cache key reflects it, the cache cannot tell visitors apart. The first request after the object expires decides what everyone gets until it expires again. That produces a typical symptom: the wrong version appears intermittently and seems related to timing rather than to the visitor.

Step 1: Write down the exact symptom

Before touching anything, capture a precise description:

  • the URL requested;
  • the country or region of the affected visitor, and how you know it;
  • the time, and whether the problem is constant or intermittent;
  • what the visitor saw and what they should have seen;
  • whether it happens on every device and browser or only some.

Intermittent symptoms point toward caching or multiple edge locations. Constant symptoms for one country point toward the rule or the location data.

Step 2: Reproduce from the affected country

Get a view from the same country as the affected visitor. Options include a colleague there, a VPN for a manual check, or a proxy with an address in that country for repeatable or scripted requests, as outlined in MDN's overview of proxy servers and tunneling. Check lawfully and at a modest rate, on sites you operate or have the right to examine, and do not try to get around any access control.

Make several requests over a few minutes, with and without cookies, and record for each one:

  • the final URL and status;
  • the content that identifies the version (language, currency, a version marker);
  • the response headers related to caching, such as Cache-Control, Age, Vary, ETag and any CDN-specific status header your provider adds to show a hit or a miss;
  • a timestamp.

If you cannot reproduce at all, the problem may depend on something particular to the visitor: a stored cookie, an address range, a device. Go back to the visitor for more details.

Step 3: Compare hit and miss behaviour

Most CDNs indicate in a response header whether the object came from cache or from the origin. Names vary by provider, so check your provider's documentation. With that information, sort your requests into two groups:

Observation What it suggests
Wrong version only when the response is a cache hit The wrong object is stored, so suspect the cache key, Vary or stale content
Wrong version also on a cache miss (fetched from the origin) The origin or the edge rule decides wrongly, so suspect the geo configuration
Right version on a miss, wrong on later hits from other countries Classic cache-key problem: one version stored for all
Different results from different edge locations Inconsistent propagation or per-location caches
Age is large and content predates the rule change Stale object after an update

If you can bypass the cache for a test, for example through a debug header or a unique query string that your configuration treats as a separate object, compare the bypass result with the cached one. A unique query string is a convenient trick, but be careful: your configuration may ignore the query string in the cache key, in which case it will not bypass anything. Verify by checking whether the cache indicator reports a miss.

Step 4: Test the rule in isolation

To test the geo decision without cache interference, you need responses that come straight from the origin or from a cache-bypass path. Then run a controlled comparison:

  1. Request from the affected country and note the decision (the version returned).
  2. Request from a country where the behaviour is known to be correct.
  3. Request from a third country that falls under the default rule.
  4. Repeat with a cookie holding a stored choice and without one.
  5. Repeat with a different Accept-Language header from the same country.

If the wrong decision is consistent for the affected country in all of these, and appears on cache misses, the rule or the location data is at fault. Look at the mapping for that country, the priority of rules, and whether the data source reports the right country for the address range you used. Because location data can differ between sources, a result from one address is not enough: try more than one address in the same country when you can.

Step 5: Test the cache in isolation

To test caching without rule interference, hold the visitor constant and vary time. Request the same URL from the same country repeatedly across a period at least as long as your cache lifetime, and watch for changes. Then ask: when the content switches, does the cache indicator change at the same time? A switch that coincides with an expiry or refill points to cache behaviour. Next, request the URL from a second country soon after a refill. If the second country receives the first country's version while the cache indicator says hit, the cache key is missing the factor.

You can also read the headers. A response that differs by country but has no Vary entry for the relevant header, and no custom key described in your CDN settings, is a strong clue. Remember that some CDNs add their own keying behind the scenes, so reading headers alone is a clue, not a verdict.

Step 6: Fix one thing and retest

Change one variable at a time:

  • If the cache key was missing the factor, add it or mark the response as varying by it, then purge the affected objects so the old copies are gone.
  • If the rule priority was wrong, correct it, and recheck all combinations of location, language and cookie.
  • If a country was missing from the mapping, add it and test the country directly.
  • If the response was cached for too long, shorten the lifetime for location-dependent pages or exclude them from caching and consider moving the decision to the edge.

After each change, repeat the same test set from the affected country and one control country. Keep the before and after results; they are your evidence that the fix works, and your reference the next time something similar shows up.

A short worked example

A shop reports that visitors in Austria sometimes see prices in Swiss francs. You test from an Austrian address. The first three requests show euros, then the fourth shows Swiss francs, and the fifth shows euros again. The cache indicator says hit on the fourth. The Age value is high, and the response has no Vary entry for the country header. You test from Switzerland: Swiss francs, hit. You suspect that a Swiss visitor refilled the cache and the object was then served to Austria.

To confirm, you request from Austria with a unique query string that the cache treats as separate and get a miss with the correct euros. That points toward the origin rule being right and the cache being at fault. The team adds the country value to the cache key, purges the page, and you retest from both countries over thirty minutes. Each country receives its own version, and both show hits. Done, with evidence.

Limits and what to watch for

  • Several layers can cache. The CDN, a reverse proxy, the application and the visitor's browser can each hold a copy, so a header you see may describe only one layer.
  • Purges take time and may be partial. After a purge, retest across several edge locations before declaring the fix.
  • Location data is imperfect. A single test address is a sample. Try more than one address where possible, and treat a surprising result as a lead.
  • Do not purge or change production rules casually. Confirm the cause first, because a mistaken fix can disturb traffic in other markets.
  • Keep tests polite. Keep the request count small, avoid flows that create orders or send messages, honour site terms, and do not use test access to bypass limits.
  • Headers differ by provider. Do not assume names from one provider apply to another; consult the documentation for yours.

Summary

Separating a CDN problem from a geo-targeting configuration problem means turning a vague complaint into controlled comparisons. Write down the exact symptom. Reproduce from the affected country with a lawful, low-volume approach. Compare cache hits and misses using the response headers. Test the rule without the cache, and the cache without the rule. Change one thing at a time and retest from the affected country and a control country, keeping the results as evidence.

If you need addresses in several countries to run these comparisons, the proxy page describes what the service offers and how to choose between plans.

Frequently asked questions

How can I tell whether a wrong regional page comes from the CDN cache?

Repeat the request from the same country several times and compare the cache-related response headers and the content. If the wrong page appears together with a cache hit and disappears after the cached object is purged or expires, the cache is the likely cause. If the wrong page appears on a cache miss, the origin rule is more likely.

Why would a CDN serve the wrong country version?

A common reason is that the cache key does not include the information used to choose the version, so one visitor's version is stored and served to others. Another is a stale object kept after a rule change.

What is the Vary header and why does it matter here?

The Vary response header tells caches which request headers affect the response. If the response depends on a country or language header but Vary does not reflect it, a cache may reuse one version for all visitors.

Can a test through a proxy prove that the geo-targeting rule is wrong?

It is strong evidence, but not proof by itself, because location databases can disagree. Combine results from several vantage points, compare headers, and confirm with the CDN's own tools or logs before changing production rules.

About the author

Bob Kanokphon Thongdee, founder of XPASS VPN

Bob Kanokphon Thongdee

  • Founder of XPASS VPN
  • Co-founder of eSIMonline.asia
  • More than 7 years in online marketing
  • Founder of Cojourney Visa and Cojourney Travel

Need a proxy for this?

XPASS Proxy sells residential proxy traffic by the gigabyte, with the price shown before you pay.

See proxy plans

Keep reading

Proxy Guides

Testing Country Redirects: What You Should Check

Country-based redirects send visitors to the right regional site, until they loop, land on the wrong page or trap a user in one language. Here is what to check and how.

10 min read

Proxy Guides

How to Track Global Campaign Landing Pages Systematically

A global campaign can quietly drift: redirects change, copy gets out of date, a regional variant breaks. Here is a simple, repeatable system for tracking every landing page by country.

10 min read

Proxy Guides

How to Check Checkout Pages in Several Countries Without a Real Transaction

Checkout pages often change by country: currency, taxes, payment methods and address fields. Here is how to verify them from each market without placing a real order.

10 min read