---
title: "Why IP Location Is Inaccurate: Geo Databases and Mobile Data"
description: "IP location is a database lookup, not positioning. Learn why mobile data shows the wrong region, plus a checklist table and a multi-database voting method."
url: https://cdnping.org/en/blog/why-ip-location-is-inaccurate
language: en
published: 2026-10-23
category: "IP & privacy"
tags: ["IP geolocation","geo IP database","mobile networks","CGNAT","exit IP"]
source: cdnping.org
license: Free to quote and summarize with a link to the url above.
---
# Why IP Location Is Inaccurate: Geo Databases and Mobile Data

Why is IP location inaccurate? Because it was never positioning in the first place. A website only sees your exit IP, looks it up in a table of "which address block maps to which region," and shows whatever comes back. That table is maintained separately by different data vendors, and they update at different speeds. Carriers may also move a block of addresses to another city, or put many users behind the same exit. When the table and reality disagree, the location drifts, and drifting into another province is not unusual. (In China, many apps and platforms display the user's IP location at province level, which is why "my IP shows the wrong province" is such a common complaint.)

## How is an IP location actually determined?

The server sees the source address of the TCP connection, which is your exit IP. It knows nothing about your GPS or your cell tower. Once it has the IP, it queries a geolocation database whose records look roughly like this:

| Address block | Country | Province | City | Carrier |
|---|---|---|---|---|
| Some /20 block | China | Some province | Some city | Some carrier |

These records usually come from a few kinds of sources:

- Registration data: address blocks are allocated by regional internet registries to carriers or companies. The registration record holds the organization name and registered address, and you can look it up via RDAP or whois. The registered address is often the company headquarters, which is not necessarily the city where the addresses are actually used.
- Carrier-supplied data: some data vendors have partnerships with carriers, and their labels for those blocks are usually more accurate.
- Measurement-based inference: latency measured from multiple probe points, plus routing paths, are used to estimate roughly where a block sits.
- User-side data: for example, some apps send back "where this IP was at the time" to data vendors after the user grants location permission.

Each vendor uses different sources, weights and update cycles, so it is common for the same IP to show different cities in different databases. For more detail, see [Why 11 IP databases give different locations: where geolocation data comes from](/en/blog/ip-geolocation-databases-differ).

## Why does it land in the wrong province?

The usual causes are listed below. A single IP can be affected by several at once.

### Carriers reallocate address pools between provinces

The address blocks a carrier holds are not permanently tied to one city. When one province runs short, the carrier may move over a block that was idle in another province. If the database still follows the old record, you are shown as being in the original province. When a broadband user gets a newly assigned address and the location suddenly changes, this is most likely why.

### Mobile data exits from centralized gateways

Mobile data traffic does not reach the public internet at the base station near you. It first goes back to the carrier's core network and leaves through a limited number of gateways. One gateway may serve several cities or even a whole region, so users under the same address block are spread widely and the database can only label one city.

Roaming makes this more obvious. Roaming traffic normally returns to the core network of the place where your number is registered before reaching the public internet, so if you are on a business trip, your mobile data still shows the province of your number. Conversely, if the database has labeled a regional gateway's address block as a neighboring province, you will appear to be in another province even while you are at home.

### CGNAT: many people sharing one public IP

IPv4 addresses are running out, so carriers let large numbers of users share one public address (carrier-grade NAT). In that case "where is this IP" has no single answer to begin with, and the database can only give an approximation. Shared addresses also affect reputation scoring; see [Does a shared IP or CGNAT hurt IP reputation?](/en/blog/shared-ip-cgnat-reputation)

### Database update lag

After an address block changes hands or is reassigned, data vendors take a while to update. Different platforms use different database versions, so on the same day one platform may show the new location while another still shows the old one.

### You are not on a local exit at all

Corporate networks often route everything through a headquarters exit, so employees at remote branches appear to be in the headquarters city. With a proxy or VPN, what you see is the location of the proxy server. There is also an easily overlooked case: the proxy only takes over IPv4 while IPv6 still connects directly, so different websites use different protocols and the locations they look up contradict each other. For troubleshooting, see [IPv6 proxy not working: why IPv4 and IPv6 exits differ on dual-stack networks, and how to debug it](/en/blog/ipv6-dual-stack-proxy-mismatch).

### Different platforms use different data sources

Social platforms, lookup sites and cloud providers' risk-control systems each plug into different data vendors, and some layer on their own correction rules. So when the result from site A doesn't match what platform B displays, that doesn't mean either side is wrong.

## Reference table: symptom, likely cause, how to verify

| What you see | Most likely cause | How to verify |
|---|---|---|
| Home broadband, location suddenly changes from your city to a neighboring province | Carrier reallocated the address pool; database still has the old record | Check RDAP for the organization the block is registered to; compare multiple databases and see whether only a few return the other province |
| Mobile data shows the province of your number while you are elsewhere | Roaming traffic returns to the home core network before reaching the internet | Switch to local Wi-Fi and look up again; the exit IP and carrier should differ between the two |
| Mobile data shows another province even when you are in your home province | Mobile gateway covers a large region; database label is off | Compare multiple databases; see whether the cities returned cluster in the same region |
| Corporate network shows the headquarters city | Centralized corporate exit | Check the ASN and organization name of the exit IP; it is usually a corporate line or the headquarters location |
| One site shows mainland China, another shows overseas | Dual-stack exits differ, or routing rules differ | Check the IPv4 and IPv6 exits separately; see which IP the mainland China site reads |
| The same IP shows different cities on different sites | Each platform uses different data sources and versions | Use multi-database voting and look at the majority opinion and confidence |
| Location shows a data center or cloud provider | You are on a proxy, VPN or cloud host | Check the IP type; the data center vs. residential IP distinction is covered in the link below |

## Check it yourself: steps you can follow

### Step 1: Confirm your real exit IP, for IPv4 and IPv6 separately

Run this in a terminal:

```bash
# IPv4 only
curl -4 -s https://www.cloudflare.com/cdn-cgi/trace | grep -E '^(ip|loc)='
# IPv6 only (an error is normal if you have no IPv6)
curl -6 -s https://www.cloudflare.com/cdn-cgi/trace | grep -E '^(ip|loc)='
```

`ip=` is the exit address, and `loc=` is the country as determined by Cloudflare. If the two runs report different countries, fix the dual-stack mismatch first, and only then worry about IP location.

### Step 2: Find out who the address block is registered to

```bash
whois YOUR_IP | grep -iE 'netname|descr|country|org'
# Or use RDAP (addresses in the Asia-Pacific region can be queried directly at APNIC)
curl -s https://rdap.apnic.net/ip/YOUR_IP | python3 -m json.tool | grep -E '"name"|"country"|"handle"'
```

This shows the block's range, the registered organization and the country. Note that it tells you "who holds this block," not "which city this IP is in right now."

### Step 3: Compare multiple databases instead of trusting just one

Open cdnping's [IP & environment check](/en/ip). The "Exit IP intel" section uses 11 geolocation databases to vote on a location and gives a confidence score. It also shows RDAP registration data and the IP type (data center, residential, mobile, Tor). Read the result in this order:

1. Is the country consistent? Country level is usually more stable than city level. If the databases disagree, suspect a proxy, a dual-stack mismatch, or a block that just changed hands.
2. Do most databases agree on the province? If most of the 11 databases give the same province and a few give a neighboring one, you can take the majority as correct; the minority is often an old record.
3. If cities are scattered, check whether they cluster in one region. Mobile networks and CGNAT addresses often look like this. City-level results are unreliable in that case, and the confidence will be low too.
4. Check the IP type. If it shows as a data center IP, you are exiting through a server, and the location reflects where that server is, not where you are. For the difference, see [Data center IP vs. residential IP: what's the difference?](/en/blog/datacenter-ip-vs-residential-ip)

### Step 4: Look up again on a different network

Check once on mobile data and once on Wi-Fi, and compare the exit IP, carrier and multi-database results. If the location is correct on the other network, the problem lies in that network's exit, not in your device.

### Step 5: See which IP mainland China sites read

When split-routing rules are enabled, mainland China sites and overseas sites may see different exits. The "Mainland split detection" feature on cdnping /ip reads the client IP reported back by several mainland China CDNs and tells you which of "mainland split / global proxy / direct domestic connection" you are currently in. For how it works, see [How mainland China sites see your real IP](/en/blog/how-chinese-sites-see-your-real-ip); for the concept of split routing, see [What is split tunneling?](/en/learn/split-tunneling)

## Several databases give different cities: which one to trust?

A few rules of thumb:

- The majority opinion is usually more reliable than a single source, but not always. Right after a block is reallocated, most databases may not have updated yet, and the few that update fast may be the correct ones. In that case, combine the RDAP registration changes with the results from your own network switch.
- When confidence is low, don't fuss over the city level. For mobile networks, CGNAT and corporate exits, city-level results are inherently hard to get right; the province is mostly what you can go by.
- Treat native IPs and broadcast IPs separately. Some address blocks are registered in one country but announced for use somewhere else, and databases tend to label them by where they are registered. For how to tell, see [Native IP vs. broadcast IP](/en/learn/native-ip-vs-broadcast-ip).
- The location a platform displays is authoritative for that platform, but it is not your real location. A platform shows the lookup result from the data source it uses; if a third-party tool shows a different city, both may be "correct" in their own way.

## A few notes on "IP location shows another province"

- Toggling airplane mode may give your mobile data a new exit address, and the location sometimes changes with it. But that only puts you in a different address block; it does not fix the bias in the database itself, so it may happen again.
- Platforms display IP location under their own rules and a regulatory background. This article only explains the technical causes and does not discuss how to change the location a platform displays. Please follow the platform's terms of service and local regulations.
- If you only want to know what your IP exposes (location precision, carrier, type, reputation), read [What your IP address actually reveals](/en/blog/what-your-ip-address-reveals).
