# Rotating proxy, a different country every request

> A rotating proxy with no country pin can exit in a different country on every request. Fine for a stateless scrape, fatal to a profile that keeps one timezone.

Source: https://mosaicbrowser.com/blog/three-countries-three-requests

## Peru, Brazil and Bahrain in three requests

A rotating proxy with no country pin can exit in a different country on every request. Fine for a stateless scrape, fatal to a profile that keeps one timezone.

![3: Three requests, three countries, one endpoint](https://mosaicbrowser.com/covers/three-countries-three-requests.webp)

A rotating proxy gives each new connection a different exit from its pool. If nothing in the username or the port names a country, the pool is the whole world, and three requests in a row can leave from three countries. We watched one endpoint do exactly that while building Mosaic's proxy check: Peru, Brazil and Bahrain, in three consecutive requests.

That is a real product, sold on purpose, and it is the right one for some jobs. It is the wrong one for a browser profile.

## Why a rotating proxy shows a different country every request

Nothing was broken. A rotating gateway is a front door to a large pool of residential exits ([residential proxy](https://mosaicbrowser.com/glossary/residential-proxy) explains where those come from). The seller hands each connection to whichever exit is free. Without a country token the choice is global, so Peru followed by Brazil followed by Bahrain is ordinary behaviour.

For a scraper that collects public prices, or a check that loads one page from many places, this is what you pay for. Every request stands alone. Nothing carries over between them, and a new exit each time spreads the load.

## Why it is fatal to a profile

A profile is a fingerprint, a proxy and a cookie jar that agree with each other. It claims one timezone, one language and one place, and Mosaic sets those from the proxy's measured exit. On a gateway that answers three countries in three requests, there is no single exit to agree with. One page can load its HTML through Peru and its scripts through Brazil, while the browser's clock says neither.

Cookies make it worse. A site that signed you in from one country sees the same session cookie arrive from another a second later. That is the pattern a stolen session makes, and a site that watches for it has no way to tell the two apart.

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)

## How our check noticed

Mosaic's proxy check makes two requests through the proxy, not one, and that is the only reason rotation shows up at all. The first is a plain HTTP lookup to `ip-api.com`, which gives the exit's address, country and timezone. The second goes the way the browser goes, a `CONNECT` tunnel to Cloudflare's `/cdn-cgi/trace` over HTTPS, which proves the proxy tunnels and reports the address Cloudflare saw. One request reports one exit and cannot say whether the next will match. Two can.

When the two disagree, the check marks the proxy as rotating and says so on the Proxies page: "Two connections came out at" both addresses, with both countries when they differ, then "This endpoint rotates, so a profile behind it cannot hold a timezone or a language." It is a warning, not a failure. The proxy works, and plenty of pools are sold this way.

The first version of that comparison was wrong in the other direction. On a dual-stack residential exit, the plain HTTP lookup left over IPv4 and the HTTPS probe over IPv6, so a string comparison called one sticky exit rotating, three checks in a row. Two addresses of different families say nothing about whether the exit moved, so only a same-family disagreement counts now ([one exit with two addresses](https://mosaicbrowser.com/blog/two-ip-addresses-one-exit) is that story).

The same reasoning reaches the profile editor. When a profile is matched to its exit, the measured exit goes along with the request instead of being measured again. A second measurement would open a second connection to a rotating gateway, get a different address, and set the profile to a place the screen above it is not showing.

## Pinning a country, or pinning an exit

There are two fixes, and they pin different things.

A country pin keeps every exit in one country while the address keeps changing. It is the seller's country option, a token in the username or a dedicated port. For a lot of work that is enough, because the checks that matter compare countries more than addresses ([pin the country, not the address](https://mosaicbrowser.com/blog/pin-the-country-not-the-address)). It does not fix a country that spans several timezones.

A sticky session pins one exit for a stretch of time. Most sellers spell it as a session id in the username. Some decide it by port, and one refused a session token on its rotating port with `Can not use -session- on rotating ports`, which is how we learned [the port, not the username, decides](https://mosaicbrowser.com/blog/session-token-on-rotating-port).

In Mosaic you rarely set either by hand. Paste the seller's gateway line once as a provider, pick a country where the seller's format has a word for it, and each profile mints its own session, so it has one exit of its own and does not share it with the profile next to it. The other checks a proxy should pass before you trust an account to it are listed step by step in [how to check a proxy before you use it](https://mosaicbrowser.com/guides/how-to-check-a-proxy-before-you-use-it).

## Questions

### Why does my rotating proxy show a different country on every request?

A rotating gateway picks a new exit from its pool for each connection. With no country in the username or port, the pool is worldwide, so consecutive requests can leave from different countries.

### How do I keep a rotating proxy in one country?

Add the seller's country option, usually a token in the username or a dedicated port. The address still changes on each connection, but every exit is in that country.

### How do I keep the same IP on a rotating proxy?

Use a sticky session: a session id in the username, or a sticky port, depending on the seller. Some sellers refuse a session id on a rotating port, so the port decides.

### Is a proxy that changes country every request useful for anything?

Yes. A job where each request stands alone, such as collecting public prices or checking a page from many places, wants as many different exits as it can get. It only becomes a problem when one identity has to stay in one place.

## Related

[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 session token on a rotating port is a 400, not a no-op](https://mosaicbrowser.com/blog/session-token-on-rotating-port): "Can not use -session- on rotating ports" means the port, not the username, decides stickiness. We had written the opposite, until we asked the gateway.

[IPv4 from one probe, IPv6 from the other: one exit, not two](https://mosaicbrowser.com/blog/two-ip-addresses-one-exit): A proxy that shows an IPv4 address on one checker and an IPv6 address on another is usually one dual-stack exit. Rotation only shows within one family.

[How to check a proxy before you use it](https://mosaicbrowser.com/guides/how-to-check-a-proxy-before-you-use-it): Check that a proxy answers and tunnels, where its exit really is, whether the address is residential or blocklisted, and that the browser stays behind it.

[Residential proxy: an exit on a home internet connection](https://mosaicbrowser.com/glossary/residential-proxy): A residential proxy sends your traffic out through an address an ISP assigned to a home connection, so sites see a household rather than a data center.

[The residential IP several detectors already knew](https://mosaicbrowser.com/blog/residential-ip-detected-as-proxy): A residential proxy can be detected as a proxy because it is one. On one Wichita exit, FingerprintJS and incolumitas never loaded in three rounds.

[Detecting a proxy with two clocks](https://mosaicbrowser.com/blog/proxy-detection-by-latency): A server times the TCP handshake to the exit and a round trip to the browser. Behind a proxy the second is longer, and the gap is the tunnel.

[Through a proxy, your TCP fingerprint is the exit's](https://mosaicbrowser.com/blog/tcp-fingerprint-belongs-to-the-exit): A proxy's exit opens its own TCP connection, so the TTL, window and options a site reads come from the exit's system, not your browser or your computer.

## 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.
