When a proxy shows the wrong country, the cause is usually one of three things: the country option isn't being applied, the website uses a different geo-IP database than the one you checked with, or the website is reading your location from something other than the IP. Each has a quick test. This guide goes through them in the order that resolves most cases fastest.
Step 1: Check the Country Option Is Actually Applied
On NodeProxies, country targeting goes in the username as a two-letter code:
# One country
http://USERNAME-country-us:[email protected]:8080
# Any of several countries
http://USERNAME-country-us,gb,de:[email protected]:8080
# Country plus sticky session
http://USERNAME-country-de-session-abc123-time-10:[email protected]:8080Common mistakes at this step:
- Using "uk" for the United Kingdom. Country codes follow ISO 3166-1 alpha-2, where the UK is "gb". Likewise Switzerland is "ch", Germany is "de" and Japan is "jp".
- Putting -country-us in the password field. Options belong in the username only.
- A config that builds the username from a variable that's empty, producing USERNAME-country- with nothing after it.
- Using several countries (us,gb,de) and expecting one specific country on every request. Each request may come from any of the listed countries.
- Reusing a sticky session id created before you added the country. Start a new session id after changing targeting.
The proxy username builder generates the string for you, which rules out typos.
Step 2: Check the IP with More Than One Geo Database
There's no single source of truth for where an IP is. Websites buy geo-IP data from different vendors, and those databases disagree, especially for residential and mobile IPs that ISPs move between regions. An IP one database places in Germany can show as the Netherlands in another for weeks.
IP=$(curl -s -x http://USERNAME-country-de:[email protected]:8080 https://api.ipify.org)
echo $IP
curl -s https://ipinfo.io/$IP/country
curl -s https://ipapi.co/$IP/country/If most lookups agree on the country you asked for and one site disagrees, that site's database is out of date for that IP. Retry with a new IP (no session parameter, or a new session id); the next one will very likely be classified correctly.
Step 3: Check What Else the Site Is Reading
Many sites decide your location from more than your IP. If the IP is right but the site still shows the wrong country, look at these:
- Cookies and account settings. A site that stored your region on the first visit keeps showing it. Clear cookies or use a fresh browser profile.
- Accept-Language header. A browser set to French will often get French content regardless of IP.
- Browser time zone. JavaScript can read your time zone; a German IP with a US Pacific time zone looks inconsistent. Automation tools let you set it, for example timezone_id in a Playwright context.
- Browser geolocation API. If you've granted location permission, the site may use GPS or Wi-Fi location instead of the IP.
- WebRTC. Some browsers can expose your real IP through WebRTC even when HTTP goes through a proxy. See DNS leaks and proxies for related leaks.
- Store or currency selection in the URL, like /en-us/ paths, which override IP-based detection.
Here's a Playwright context that keeps the signals consistent with a German exit:
from playwright.sync_api import sync_playwright
with sync_playwright() as p:
browser = p.chromium.launch(proxy={
"server": "http://global.nodeproxies.xyz:8080",
"username": "USERNAME-country-de-session-de01-time-15",
"password": "PASSWORD",
})
context = browser.new_context(
locale="de-DE",
timezone_id="Europe/Berlin",
)
page = context.new_page()
page.goto("https://example.com")
print(page.title())
browser.close()Step 4: Rule Out a Proxy That Isn't Being Used
If the "wrong country" is actually your own country, your traffic may not be going through the proxy at all. A client that ignores the proxy for HTTPS (for example, a requests proxies dict with only an "http" key) silently goes direct for https:// URLs. Visit what is my IP through the same client and compare it with your real IP. Our guide on testing whether a proxy is working covers this check.
Choosing the Right Country Setup
For localized prices, search results or ad checks, use a single country per request and match the browser locale to it. For general scraping where location doesn't matter, leave targeting off or list a few nearby countries to widen the pool. Country pages such as United States, United Kingdom and Germany show what's available.
Geo Targeting with NodeProxies
Residential proxies cover 195+ countries with country targeting in the username, and mobile proxies cover 50+ countries. Pricing is per GB with no subscription; see the pricing page.
FAQ
Why does my proxy show a different country than I selected?
Either the country code is wrong or misplaced (it must be in the username, and the UK is "gb"), or the site's geo-IP database classifies that IP differently. Retry with a new IP and compare several lookups.
What is the country code for UK proxies?
Use "gb", the ISO 3166-1 code for the United Kingdom: USERNAME-country-gb.
Why does a website still show my real location with a proxy?
It may be using cookies, browser language, time zone, the geolocation API or WebRTC rather than your IP. Use a fresh profile and match locale and time zone to the proxy country.
