Skip to content

IP geolocation and geo-blocking: how websites decide where you are

By the ProxyOnly team · 14 Nov 2026 · 5 min read · Updated 16 Nov 2026

Websites guess your location from your IP address using databases that disagree. How it works, how accurate it is, and how to test from another country.

A website does not know where you are. It looks up your IP address in a database that estimates a location, and acts on the estimate. Geo-blocking, regional pricing, local search results and language defaults all start from that lookup.

That has two practical consequences. The location a site sees is only as good as its database, and different databases disagree. This article explains where the data comes from, how accurate it is, why a proxy in one country can look like another on some sites, how geo-blocking is enforced, and how to test a site as a visitor from somewhere else.

Where IP location data comes from

There is no master list of where every address physically sits. Providers of IP location data piece it together from several sources:

  • Registry records. The regional internet registries record which organisation holds each block of addresses and its country, but that is where the holder is registered, not where the addresses are used.
  • Self-published feeds. Network operators can publish a mapping of their address ranges to locations in a standard format, defined in RFC 8805, which it describes as intentionally coarse-level.
  • Measurements. Providers probe addresses from known places and use routing and delay to narrow down where they are.
  • Corrections and other data. User reports, enterprise customers and, for some commercial datasets, data from apps and devices that share location with consent.

Commercial providers such as MaxMind, IP2Location and IPinfo combine these differently and update on their own schedules. That is why they can give different answers for the same address.

How accurate is it?

Country is usually reliable. Region and city are less so, and none of them is an address. MaxMind's GeoIP results carry an accuracy radius for each location, precisely because the city is an estimate, not a fact.

Accuracy is best for fixed broadband in dense areas. It is worst for:

  • mobile networks, where one address covers a whole region and often geolocates to a carrier gateway, as explained in what is CGNAT
  • satellite and large corporate networks, where traffic exits far from the user
  • addresses that changed hands recently and have not been updated everywhere
  • VPN and proxy addresses, where the database may show the registered location, the provider's location or the exit's location, depending on the database

Why your location, or your proxy's, looks wrong

  • The address belongs to a provider whose gateway is in another city.
  • It is a mobile or shared address and the database shows a regional hub.
  • A range was moved to another country and one database has not caught up.
  • Two databases disagree, and the site you are testing uses a different one from the lookup page you checked.

This is the usual reason a proxy sold as being in Germany shows up as a different city, or occasionally another country, on a lookup page. What matters for your work is how the site you care about sees it, which a lookup page cannot tell you.

How geo-blocking works

A site can use several layers, and most use more than one:

  • IP geolocation, by far the most common. The site or its security provider looks up your address and compares the country with its rules.
  • A header added by the content delivery network. Cloudflare passes the visitor's country in CF-IPCountry and Amazon CloudFront in CloudFront-Viewer-Country, so the origin server rarely does the lookup itself. See the Cloudflare and CloudFront documentation.
  • Account and payment data, such as the country on your billing address or account.
  • Device location, in apps that ask for it.
  • Soft signals such as Accept-Language, which affect which version of a page you see, though they rarely block anyone.

Sites geo-block for reasons that are often legal rather than commercial: content licences, gambling and advertising rules, sanctions, and privacy law.

Testing a site as a visitor from another country

Checking what a visitor in another country sees is ordinary, legitimate work: price checks, ad verification, localisation and QA. A reliable way to do it:

  1. Use a proxy in that country. With ProxyOnly you choose the country when you order, so for a German exit you order a proxy in Germany.
  2. Verify the exit with two or three independent lookups. They may disagree on the city, which is normal.
  3. Request the page you actually care about, because that is what decides.
  4. Make the rest of the request consistent, such as the language header.
  5. Record what you see, with the date.
curl -s -x http://USERNAME:PASSWORD@HOST:PORT https://ipinfo.io/json
curl -s -x http://USERNAME:PASSWORD@HOST:PORT -H "Accept-Language: de-DE,de;q=0.9" https://example.com/

The first command returns the address, country, region, city and network that a lookup service assigns to your exit. The second requests a page with a German language preference. The country guide covers how the country is chosen, and proxies by location shows what is available.

Keep the signals aligned. An address in Germany combined with a browser set to another time zone and language is a mismatch that some sites treat as suspicious, which is covered in browser fingerprinting explained.

When a proxy is the wrong answer

Geo-blocking often exists because of a licence or a legal requirement. A proxy lets you see a site as a local visitor would, which is what testing needs. It does not give you the right to use content you are not licensed to use or to break a site's terms or the law where you live. If a restriction is there for a legal reason, working around it is not a technical problem to solve.

You can also look at what any address reveals with the IP lookup tool, and the ASN guide shows how to find the network behind an address.

Questions people ask

Can I change my IP location?

You can change the location that sites infer by using a proxy or VPN, which replaces your address with one somewhere else. You cannot change your physical position, and signals such as device location in an app or the country on your payment card are separate.

Does IP geolocation use GPS?

No. An IP lookup is a database estimate. Browsers and apps can ask for your device location through a separate permission prompt, and that is different data.

Why does a site show the wrong city?

Because the database entry for your address is an estimate. Providers differ, and mobile and shared addresses are the least accurate.

Try it yourself

Create an account, add funds from US$1 and order a proxy in the country you need.

Keep reading