🎉 Premium Proxies · 24-Hour Free TrialClaim Now
Guides

Not Available in Your Country Even With a Proxy? Fix It

Seeing not available in your country even with proxy set to the right country? Run a 5-step leak test for DNS, WebRTC, cookies, account region and IP type.

S SparkProxy 3 19 min read
Share
Not Available in Your Country Even With a Proxy? Fix It

Getting not available in your country even with proxy routing set to the right exit means the site found out something your proxy didn't hide, or it judged the exit itself rather than its location. The country check is rarely the thing that failed. Usually your real address escaped through DNS or WebRTC, the site remembered you from an earlier visit, your account is pinned to another region, or the exit IP belongs to a datacenter range the site refuses as policy. Below is a test sequence that separates those five cases, and the fix for each result, including the two a proxy cannot fix.

Read the Block Message Before Changing Anything

The wording of the refusal tells you which layer said no. People skip this and start swapping exits, which wastes an hour when the message already named the cause.

What you seeWho produced itWhat it actually means
`Error 1009` "Access Denied: Country or region banned"Cloudflare's edge, on the owner's ruleThe connecting IP geolocates to a banned country. Decided on the IP alone
HTTP `451 Unavailable For Legal Reasons`The origin or a blocking entityA legal demand blocks the resource; RFC 7725 says the response SHOULD carry a `Link` header with `rel="blocked-by"`
"You seem to be using a VPN or proxy. Please turn off any of these services and try again."Netflix's playerThe IP was classified as a VPN or proxy. Country never entered into it
A generic "not available in your region" page with HTTP 200The site's own app logicCould be IP country, IP type, cookie, account or a leaked address. Needs the test below
Store listing hidden or "item not available" while logged inThe account's region settingThe account country decides, not the connection

Sources for the verbatim strings: Cloudflare's Error 1009 page, RFC 7725 sections 3 and 4, and Netflix Help article 277, all read on 2026-10-31.

The third row deserves a second look. A message that mentions a VPN or proxy is a classification verdict on the IP, so a different country from the same pool type will get the same answer. And when a streaming service blocks a proxy, that's a licensing and terms-of-service line, not a configuration bug; this guide is written for QA, ad verification, localized content checks and data collection on sites that allow it.

Two quick header checks before anything else. If the response carries CF-RAY and the body says 1009, skip to the 1009 section. If the status is 451, read the Link header. Neither of those is a leak.

What Overrides a Country-Correct Exit

A proxy controls one thing: the source address of the TCP connection that reaches the site. A geo check that still fails has used some other input. There are five, and they differ in who can fix them.

OverrideWhat the site observesCan a different proxy fix it?
IP typeASN and "hosting" flag of the exit, not just its countryOnly a different class of IP (residential instead of datacenter)
DNS outside the tunnelYour resolver, or a GeoDNS answer chosen for your real locationNo. Change the client's resolution mode
WebRTCYour real public IP, gathered by page JavaScript over UDPNo. Change the browser policy
Stored identityA cookie, `localStorage` value or saved profile from an earlier countryNo. Clear or isolate state
Account regionBilling country, payment method, profile settingNo. Account-side only

Geo-targeting itself, how a provider maps exits to countries, is covered in what geo-targeting means in proxies. Here we only care about the inputs that beat it.

Free trial

Scraping at scale? Skip the blocks.

Fast, unblockable datacentre proxies with unlimited bandwidth.

The Leak Test, in Five Steps

Run these in order. Each step is cheaper than the next, and each one either ends the search or rules a cause out.

  1. Confirm the exit really is in use and in the right country. If the IP seen by the site is your own, nothing else matters yet.
  2. Read the exit's classification. Country, ASN, and whether lookup services flag it as hosting or proxy.
  3. Check where hostnames are resolved. Scheme of the proxy URL, plus a DNS leak test.
  4. Probe WebRTC in the browser you actually use. Look for a server-reflexive candidate carrying your real IP.
  5. Retry with an empty profile, logged out. If that works, the block came from stored state or the account.

Steps 1 to 3 fit in one script. It uses ip-api.com's JSON endpoint, which documents a hosting field ("Hosting, colocated or data center") and a proxy field ("Proxy, VPN or Tor exit address"). The free endpoint is HTTP only and limited to 45 requests per minute per IP, per its docs read 2026-10-31, so keep it to spot checks.

import os
import sys

import requests

PROXY = os.environ["PROXY_URL"]  # e.g. http://USER:PASS@gateway.sparkproxy.io:11000
EXPECTED = os.environ.get("EXPECTED_COUNTRY", "GB")
LOOKUP = "http://ip-api.com/json/"
FIELDS = "status,countryCode,as,asname,proxy,hosting,mobile,query"


def lookup(proxies=None):
    r = requests.get(LOOKUP, params={"fields": FIELDS}, proxies=proxies, timeout=20)
    r.raise_for_status()
    return r.json()


def main():
    direct = lookup()
    via = lookup({"http": PROXY, "https": PROXY})
    problems = []

    if via.get("query") == direct.get("query"):
        problems.append("step 1: exit IP equals your own IP, the proxy is not applied")
    if via.get("countryCode") != EXPECTED:
        problems.append("step 1: exit geolocates to %s, not %s" % (via.get("countryCode"), EXPECTED))
    if via.get("hosting"):
        problems.append("step 2: exit is classed as hosting (%s)" % via.get("as"))
    if via.get("proxy"):
        problems.append("step 2: exit is flagged as proxy/VPN by this database")
    if PROXY.startswith("socks5://") or PROXY.startswith("socks4://"):
        problems.append("step 3: socks5:// resolves hostnames locally, use socks5h://")

    print("direct:", direct)
    print("via proxy:", via)
    for p in problems or ["steps 1-3 clean, continue with the WebRTC probe"]:
        print(" -", p)
    return 1 if problems else 0


if __name__ == "__main__":
    sys.exit(main())

Run without a proxy from our Windows test server on 2026-10-31, the lookup returned "countryCode":"IN", "as":"AS55836 Reliance Jio Infocomm Limited", "hosting":false, "proxy":false. That's the shape to expect for a consumer line. A datacenter exit will typically come back with the hosting provider's AS name, and the flags depend on that one database. Treat a single lookup service as a hint, not the verdict the target uses; cross-checking several sources is covered in our guide to validating IP geolocation accuracy and fraud scores.

If the Exit Is Classed as a Datacenter

This is the case people miss most, because the country is correct and every leak test is clean. The site simply doesn't serve hosting networks. Many sites write their geo policy as "country is X and the network isn't a cloud or hosting provider", and some then show the same "not available in your country" page for both failures.

On Cloudflare, an owner can express that in one custom rule. The fields are real (ip.src.country is the ISO alpha-2 country, ip.src.asnum the AS number of the client IP, per Cloudflare's field reference read 2026-10-31); the ASN list below is an illustration, not any site's actual rule:

(ip.src.country ne "GB") or (ip.src.asnum in {16509 14618 15169 8075 14061})

Read it the way the site does: a GB address on AS16509 still matches the second clause and gets blocked. No change of country helps with that.

Here's the honest part for our own product. SparkProxy's proxy plans are datacenter IPs: the homepage lists "1M+ datacenter IPs" across 80+ locations (read 2026-10-31). They're fast, plans start from $75/month in USD with unlimited bandwidth, and they're the right tool for any target that checks country alone. On a target that does, switching to another SparkProxy country won't change the answer, and you shouldn't burn time rotating through exits.

What does work for those targets is a residential exit. The SparkProxy Scraping API's docs describe the premium pool as "real ISP IPs that are much harder to detect and block" and document proxy_type=premium as combinable with country_code. Per the Scraping API docs read 2026-10-31, the premium tier costs 10 credits without JavaScript and 25 with it, country_code adds 5, and render_js defaults to true, so set it explicitly.

import base64
import os

import requests

API = "https://scrape.sparkproxy.io/api/v1"
KEY = {"X-API-Key": os.environ["SPARKPROXY_API_KEY"]}
BLOCK_MARKERS = ("not available in your country", "not available in your region")


def fetch_residential(url, country):
    params = {
        "url": url,
        "country_code": country,
        "proxy_type": "premium",
        "render_js": "false",
        "json_response": "true",
    }
    r = requests.get(API, params=params, headers=KEY, timeout=120)
    r.raise_for_status()
    envelope = r.json()
    html = base64.b64decode(envelope.get("body") or "").decode("utf-8", "replace")
    blocked = any(m in html.lower() for m in BLOCK_MARKERS)
    return envelope.get("status_code"), envelope.get("credits_used"), blocked


print(fetch_residential("https://shop.sparkproxy.io/uk-only", "GB"))

Two details in there matter. The envelope (job_id, status_code, duration_ms, credits_used, body) only exists with json_response=true, and its body is base64, so the code decodes it before looking for the block text. Matching the marker against the raw envelope would never find it. format=json is a content conversion, not the envelope, so don't swap one for the other. By the docs' table this call costs 15 credits (10 premium, 5 country), and new accounts get 1,000 free credits, enough to confirm whether the target is a hosting-ban case before you change anything else.

If DNS Is Resolved Outside the Proxy

A DNS leak doesn't change the IP the site sees, so why does it matter here? Two reasons. Large services answer DNS by location, so a hostname resolved by your local resolver can point you at a regional host built for your real country, and that host serves the regional block page. And some services compare the resolver to the connection: Netflix's help article on its proxy error tells users whose location looks wrong to have their ISP check whether the connection uses the ISP's own DNS server.

For HTTP and HTTPS through an HTTP proxy, the client sends the hostname in the request or the CONNECT line and the proxy resolves it. The leak shows up in three places: SOCKS URLs with the wrong scheme, tools that resolve a name before handing an IP to the proxy, and system-level tunnels that split DNS from traffic.

The scheme is the usual culprit. Requests' own documentation states that socks5 "causes the DNS resolution to happen on the client", and that you should use socks5h to resolve on the proxy server. curl follows the same convention.

# resolves locally: the lookup goes to your own resolver
curl -s -o /dev/null -w "%{http_code}\n" -x "socks5://$PUSER:$PPASS@gateway.sparkproxy.io:13000" https://shop.sparkproxy.io/uk-only

# resolves at the proxy: the lookup happens at the exit
curl -s -o /dev/null -w "%{http_code}\n" -x "socks5h://$PUSER:$PPASS@gateway.sparkproxy.io:13000" https://shop.sparkproxy.io/uk-only

If the first returns the block and the second doesn't, you've found it. In Python the fix is the same one character:

import os

import requests

PROXY = "socks5h://%s:%s@gateway.sparkproxy.io:13000" % (
    os.environ["PROXY_USER"],
    os.environ["PROXY_PASS"],
)

with requests.Session() as s:
    s.trust_env = False  # ignore stray HTTP_PROXY / ALL_PROXY variables
    r = s.get("https://shop.sparkproxy.io/uk-only", proxies={"http": PROXY, "https": PROXY}, timeout=30)
    print(r.status_code, "not available" in r.text.lower())

SOCKS support in Requests needs the requests[socks] extra. For desktop browsers and OS-level setups, run a proper resolver test; the method, the tools and the OS-level controls are in the proxy DNS leak testing guide.

If WebRTC Reveals Your Own Address

A page can ask the browser for ICE candidates through a STUN server. That traffic is UDP, and an HTTP proxy only carries TCP, so the browser asks STUN directly and learns your real public address as a "srflx" (server-reflexive) candidate. The page's JavaScript reads it and can compare it with the connection IP. The background on STUN and ICE is in what WebRTC leaks are; what follows is what we measured in a headless scraper setup.

This probe collects candidates and prints their type and address:

import os

from playwright.sync_api import sync_playwright

ICE_PROBE = """
() => new Promise((resolve) => {
  const seen = new Set();
  const pc = new RTCPeerConnection({iceServers: [{urls: "stun:stun.l.google.com:19302"}]});
  pc.createDataChannel("probe");
  pc.onicecandidate = (e) => {
    if (!e.candidate) { pc.close(); resolve([...seen]); return; }
    const f = e.candidate.candidate.split(" ");
    seen.add(f[7] + " " + f[4]);
  };
  pc.createOffer().then((o) => pc.setLocalDescription(o));
  setTimeout(() => { pc.close(); resolve([...seen]); }, 8000);
})
"""


def candidates(extra_args):
    proxy = {
        "server": "http://gateway.sparkproxy.io:11000",
        "username": os.environ["PROXY_USER"],
        "password": os.environ["PROXY_PASS"],
    }
    with sync_playwright() as p:
        browser = p.chromium.launch(proxy=proxy, args=extra_args)
        page = browser.new_page()
        page.goto("about:blank")
        found = page.evaluate(ICE_PROBE)
        browser.close()
        return found


print("default:", candidates([]))
print("policy :", candidates(["--webrtc-ip-handling-policy=disable_non_proxied_udp"]))

We ran the same probe on 2026-10-31 with Playwright for Python 1.63.0 and Chromium 156.0.8078.4 on Windows Server 2022, with a proxy configured on the browser:

Launch argumentsCandidates returned
none`host .local`, `srflx `
`--force-webrtc-ip-handling-policy=disable_non_proxied_udp``host .local`, `srflx `
`--webrtc-ip-handling-policy=disable_non_proxied_udp`none

Three things came out of that. A configured proxy did nothing to stop the srflx leak. The local address was already hidden behind an mDNS .local name, so the private-IP leak is not the problem here; the public one is. And the --force- spelling of the flag, which some guides recommend for headless Chromium, had no effect in this build, while the plain --webrtc-ip-handling-policy switch removed every candidate. Verify on your own Chromium version with the probe rather than trusting either spelling.

Headless jobs that never touch WebRTC pages won't care. Targets running fraud or licensing scripts often do, so set the policy whenever a block appears only in the browser and not in curl.

If Cookies or a Profile Remember Another Country

The test is a fresh, logged-out context against the same exit. If it works and your normal run doesn't, something stored is overriding the IP.

import os

from playwright.sync_api import sync_playwright

URL = "https://shop.sparkproxy.io/uk-only"
PROXY = {
    "server": "http://gateway.sparkproxy.io:11000",
    "username": os.environ["PROXY_USER"],
    "password": os.environ["PROXY_PASS"],
}


def blocked(page):
    page.goto(URL, wait_until="domcontentloaded")
    return "not available in your country" in page.content().lower()


with sync_playwright() as p:
    saved = p.chromium.launch_persistent_context("./profile-old", proxy=PROXY)
    print("saved profile blocked:", blocked(saved.new_page()))
    saved.close()

    browser = p.chromium.launch(proxy=PROXY)
    fresh = browser.new_context(locale="en-GB", timezone_id="Europe/London")
    print("fresh context blocked:", blocked(fresh.new_page()))
    browser.close()

A persistent context keeps cookies and localStorage between runs, which is the point of it and the source of the bug. Give each target country its own profile directory, or use fresh contexts. If you rotate exits, use Random Rotation on port 11000 for anonymous page loads; when a login must keep one address, Sticky Sessions on port 11002 holds the exit for five minutes, and the cookie jar should live exactly as long as that session.

Locale, timezone and Accept-Language mismatches usually produce the wrong language or currency rather than a hard block, so they sit outside this guide. They're the next thing to check if the fresh context still fails.

If the Account Region Wins

When the block appears only while logged in, stop testing the network. The account's country is a stored attribute, and the site trusts it over the connection.

Google Play is a clear documented example. Its help page on changing country (read 2026-10-31) says you must be in the new country and have a payment method from it, and that after setting a Play country "you must wait at least 90 days before you can change it". The old country's Play balance can't be spent in the new one. A proxy changes none of that, because none of it reads the IP.

Streaming catalogs, app stores and many SaaS products work the same way: billing country, tax profile and payment method define the region. The right fix is an account that legitimately belongs to the country you're testing. For QA and localization work, that usually means a test account created in-region by your team there.

Error 1009 and HTTP 451 Through a Proxy

These two look alike and need opposite responses.

Error 1009 is decided purely on the connecting IP at Cloudflare's edge. If you get it through a proxy you believe is in an allowed country, the edge's geo data puts that exit elsewhere. Request /cdn-cgi/trace on the same host through the same exit and read the loc= line; if it disagrees with your IP checker, that specific exit is mapped to another country by Cloudflare's database. Drop it and draw a new one. With unlimited bandwidth on SparkProxy plans, a discarded test request costs time on a thread, not traffic.

HTTP 451 is a legal block. RFC 7725 defines it as the server "denying access to the resource as a consequence of a legal demand", and the Link: <...>; rel="blocked-by" header, when present, names who imposed it. Treat 451 as a stop sign for automated collection. It isn't a detection problem to engineer around.

Fix Map: Test Result to Remedy

Test resultCauseFixFixable by changing proxy?
Exit IP equals your ownProxy not applied (env var, `trust_env`, wrong client option)Pass proxies explicitly, set `trust_env = False`Not a proxy issue
Exit country wrong at the site, right at your checkerGeo database disagreementDiscard that exit, take another from the poolYes
Country right, `hosting` true, block persistsDatacenter range banned as policyResidential route: Scraping API `proxy_type=premium`Yes, by IP class, not country
Block only with `socks5://`Local DNS resolutionSwitch to `socks5h://`No, client setting
srflx candidate shows your real IPWebRTC over direct UDP`--webrtc-ip-handling-policy=disable_non_proxied_udp`No, browser setting
Fresh context works, saved profile failsStored region cookie or storageIsolate profiles per countryNo
Fails only when logged inAccount regionIn-region accountNo
451 with `rel="blocked-by"`Legal demandStopNo

Two rows out of eight are fixed by a different IP. That ratio is roughly why "buy more countries" so rarely ends this problem. If you'd rather confirm a block automatically before re-running a job, the signals are laid out in how to detect when your scraper is blocked.

Frequently asked questions

FAQ

Because the site used something other than the exit's country: a DNS lookup or WebRTC request that skipped the proxy, a stored cookie, your account's region, or the exit's IP type. Run the five-step leak test to see which one, starting with the exit IP and its hosting flag.

Yes, when the site only checks country. When the site also refuses hosting networks, a datacenter exit in the right country is still blocked, and only a residential IP, such as the Scraping API's proxy_type=premium pool, changes the result.

Use the socks5h:// scheme instead of socks5:// in curl and Python Requests, so the proxy resolves hostnames instead of your local resolver. Over an HTTP proxy, the hostname already goes to the proxy in the CONNECT line.

In our 2026-10-31 test with Chromium 156, yes: a proxied headless browser still returned our real public IP as a srflx candidate. Launching with --webrtc-ip-handling-policy=disable_non_proxied_udp removed it, while the --force- variant did not.

It means Cloudflare's geo data places your exit IP in a country the site owner banned. Check loc= at /cdn-cgi/trace on the same host through the same exit, and if it's wrong, switch to another exit.

Only if the block came from a stored region. Test with a fresh, logged-out browser context on the same exit: if that loads, isolate profiles per country; if it still fails, the cause is the IP type, a leak, or the account region.

Special Discount · 20% off

Get 20% off your first month

Premium datacentre proxies with unlimited bandwidth. Use the code at checkout.

Save up to 15% more on quarterly, half-yearly and yearly plans

Claim Discount

About the Author

The SparkProxy Technical Team runs SparkProxy's datacenter proxy gateway and the Scraping API, so the geo-block cases in this guide are the ones we debug for customers. The WebRTC and IP classification results above were measured by the team on 2026-10-31, and every vendor statement links back to that vendor's own documentation or help pages.

Keep reading

Related articles

Web Bot Auth: Sign Your Agent's HTTP Requests

Web Bot Auth: Sign Your Agent's HTTP Requests

Web Bot Auth explained and implemented: Ed25519 keys, the key directory, RFC 9421 signatures in Python and Node, who verifies them, and the header format trap.

SparkProxy·Guides