# How to test affiliate link redirects by country

> An affiliate tracker picks the landing page from the visitor's IP country. To see a German visitor's page, click from a German exit on German time.

Source: https://mosaicbrowser.com/blog/affiliate-redirects-by-country

## Following an affiliate link's redirects from three countries

An affiliate tracker picks the landing page from the visitor's IP country. To see a German visitor's page, click from a German exit on German time.

![One link, three countries, three landing pages](https://mosaicbrowser.com/covers/affiliate-redirects-by-country.webp)

To test affiliate link redirects by country, you have to click the link from each country. The tracker decides on the server, from the visitor's IP address, so an exit in that country is the minimum. A real visitor's browser also carries a timezone and a language, and the landing page at the end of the chain may read both. Only a browser whose exit, language and timezone agree on one country sees the page a visitor there gets.

## How an offer decides where to send a click

An affiliate link rarely points at the merchant. It points at the network's tracking domain, and the chain usually runs like this:

1. The tracker receives the click and records it, with your publisher ID and any sub-ID.
2. It looks up the country of the IP address the request came from.
3. It checks the offer's allowed countries. A click from an accepted country goes to that country's landing page. One from elsewhere goes to a fallback: another offer, a generic page, or a "not available in your region" page.
4. It answers with an HTTP redirect, and sometimes the next hop is a second tracker, the advertiser's own, which runs its own lookup.

That lookup happens before your browser has run a line of JavaScript, so nothing in the browser can influence it except the address. The landing page is where the browser starts to count. A page built for several markets often picks its language from `navigator.language` or the `Accept-Language` header, and some read the timezone to decide which prices or which legal text to show.

Mosaic is a desktop app

Email yourself the link and open it on your computer.

[How it works: Provider minting](https://mosaicbrowser.com/features/proxy-providers)

## What curl tells you, and what it misses

The fastest first look is from the command line, through a proxy in the country you want to test:

```
curl -sIL -x http://user:pass@gateway:port 'https://track.example/click?id=123' | grep -i '^location'

```

That prints every HTTP redirect the servers send, in order, so you can see the tracker hand the click on and where it lands. It is worth doing for each country, because a chain that ends at the same URL everywhere is often an offer whose country rules were never set.

It misses two things. Many chains include a page that redirects with a meta refresh or a script, and curl stops there. And curl sends no browser language and has no timezone at all, so a landing page that reads them sees a visitor no country produces.

## How to test affiliate link redirects by country: three profiles

The test that matches a real visitor is a browser per country. Take three: Germany, the United Kingdom and the United States. Each profile needs an exit in its country, a language a person there would plausibly have, and that country's local time. If any one of the three points elsewhere, you are testing a mixture.

The mismatches are easy to make by hand. A VPN moves the IP and leaves the timezone where you are. A browser set to German that browses from a US exit is a visitor a US offer may treat oddly. And a residential exit can move between sessions, which is why the setting worth fixing is the country rather than the address ([pinning the country, not the address](https://mosaicbrowser.com/blog/pin-the-country-not-the-address), has the reasoning).

Run the same link in all three and record, per country, every URL in the chain and the page you end on. The difference between the three columns is the offer's geo setup, written out.

## Doing it in Mosaic

A Mosaic profile carries its own exit, fingerprint and cookie jar. Save your proxy seller's gateway line once as a provider, then make one profile per country and pick the country for each. Every profile mints its own session, and Mosaic checks the proxy before the browser opens. The profile's timezone, language and geolocation are set from the exit it measured, so the German profile reads German time without you setting it.

One thing it deliberately leaves alone. The language follows the exit only on a profile that has never run; on one with history, a language that disagrees with the exit is reported and kept, because the site has been hearing it all along ([the profile that kept speaking Mexican Spanish](https://mosaicbrowser.com/blog/accept-language-and-proxy-country) is how we got there). For a geo test, a new profile per country is the clean start.

Start each profile, paste the link, and open the browser's developer tools on the Network tab with "Preserve log" ticked before you click. Every hop then stays in the list, including the script redirects curl could not follow. For a run that should start from nothing, test in a profile whose jar is empty, since an earlier click's cookie can change which page a tracker serves ([testing affiliate link tracking with a clean jar](https://mosaicbrowser.com/blog/testing-affiliate-link-tracking) covers clearing it).

## Keep it to your own links

This is a check that your links send each country where your programme says they will. Read the programme's terms on test clicks, and do not buy through your own link to test it. Showing a reviewer one page and visitors another is cloaking, which networks prohibit and we will not help with. The same three-profile setup also suits a merchant checking its own storefront by country, which [the Shopify Markets test](https://mosaicbrowser.com/blog/shopify-markets-geolocation-test) walks through, and an agency checking client campaigns, as in [the ad-account setup](https://mosaicbrowser.com/use-cases/ad-account-management).

## Questions

### How do affiliate links redirect by country?

The click goes first to the network's tracking domain. Its server looks up the country of the visitor's IP address, checks which countries the offer accepts, and answers with a redirect to that country's landing page or to a fallback offer.

### Can I test geo redirects with a VPN?

It moves the IP, which is what the tracker reads. It leaves your browser's timezone and language at home, so a landing page that reads those in JavaScript can still show you something a real visitor there would not see.

### Why does curl show a different final page from my browser?

curl follows only the HTTP redirects the server sends. Many affiliate chains add a meta refresh or a JavaScript redirect on an intermediate page, and those only run in a browser.

### Is testing affiliate links from other countries allowed?

Clicking your own links to confirm where they go is ordinary link testing. Read your programme's terms on test clicks and never place orders through your own link to test it; showing reviewers a different page from visitors is cloaking, which networks prohibit.

## Related

[Testing whether your affiliate links track, with a clean jar](https://mosaicbrowser.com/blog/testing-affiliate-link-tracking): To test whether an affiliate link tracks, click it from a browser with an empty cookie jar and read what it set. An old click's cookie can spoil the test.

[Checking what Shopify Markets shows a buyer in each country](https://mosaicbrowser.com/blog/shopify-markets-geolocation-test): To test Shopify Markets geolocation, make the exit, timezone and language name one country: Shopify reads the IP for country and the browser for language.

[Pin the country, not the address](https://mosaicbrowser.com/blog/pin-the-country-not-the-address): A residential pool moves your exit whatever you do. The checks that matter compare countries, so pin the country and let the address move inside it.

[A Russian exit and a profile speaking Mexican Spanish](https://mosaicbrowser.com/blog/accept-language-and-proxy-country): A profile matched to a Russian exit kept sending es-MX in Accept-Language. Leaving the language alone was right. Saying nothing about it was the bug.

[Mosaic for agencies and media buyers managing ad accounts](https://mosaicbrowser.com/use-cases/ad-account-management): Keep each client's ad platform logins, two-factor codes and sessions in their own browser profile, and see their ads from the client's own market.





[Proxies for ad verification: which type to use](https://mosaicbrowser.com/guides/proxies-for-ad-verification): The best proxies for ad verification are residential, in the ad's target city, with one sticky session per profile. Datacenter exits fit link checks only.

## Mosaic, on your own computer

The browser this blog is about: its own Chromium, fingerprints from real machines and a proxy exit per profile. Free holds 3 profiles. Pro is $49 a month for any number.

Mosaic is a desktop app

Email yourself the link and open it on your computer.
