Every time you load a webpage, stream a video, or check your email, the server on the other end makes a decision about where you are. Netflix decides which content library to show you. Your bank decides whether to flag your login as suspicious. Google decides which language to greet you in. These decisions happen over 40 billion times a day across the internet, and they're all powered by the same underlying technology: IP geolocation.
The concept sounds simple — map an IP address to a location. But an IEEE study comparing four major geolocation databases found an average discrepancy of 620 kilometers between them for the same IP address. A University of Chicago study found median errors of just 2–4 km for broadband users in major cities, while cellular accuracy within 1 km was as low as 3% in some countries. The technology is simultaneously impressive and unreliable, depending entirely on context.
Most explainers give you the marketing version: "99% country accuracy, 80% city accuracy." This guide goes deeper — the six data sources behind every lookup, what independent research actually measured, and the specific scenarios where geolocation breaks down completely.
In this article
IP Geolocation in One Paragraph
IP geolocation is the process of mapping an Internet Protocol address to an approximate physical location — a country, region, city, or set of coordinates. It works by correlating IP address assignments (which network got which addresses) with physical infrastructure locations (where those networks actually operate). Every device on the internet has an IP address, and every IP address belongs to a network that operates in a physical place. Geolocation databases compile this mapping from multiple data sources, updated daily or weekly, to enable instant lookups.
The key word is approximate. IP geolocation identifies where your ISP routes your traffic from, not where you physically sit. For most broadband users in developed countries, this is accurate to the city level. For mobile users, satellite internet subscribers, or anyone behind a VPN, it can be off by hundreds of kilometers.
The Six Data Sources Behind Every Lookup
Most articles say "IP geolocation works by mapping IP addresses to locations." That's like saying "GPS works by using satellites." Technically correct, operationally useless. Here are the six actual data sources that geolocation providers combine:
1. Regional Internet Registry (RIR) / WHOIS Data
IANA allocates IP blocks to five Regional Internet Registries: ARIN (North America), RIPE NCC (Europe/Middle East), APNIC (Asia-Pacific), LACNIC (Latin America), and AFRINIC (Africa). These RIRs delegate blocks to ISPs and organizations, recording the registrant's name and address.
What it tells you: Which organization owns an IP block and where they're headquartered.
Limitation: An ISP headquartered in Dallas might serve customers across 15 states. The registered address is the company's office, not where the IP is actually used.
2. BGP Routing Analysis
The Border Gateway Protocol governs how IP prefixes are announced across the internet. By analyzing BGP routing tables from projects like Route Views and RIPE RIS, providers can identify which Autonomous System (AS) originates each IP prefix and where its peering points connect to the rest of the internet.
What it tells you: Network topology — which network announced this IP and where it interconnects with other networks.
Limitation: An AS can announce prefixes from one location but serve users across a continent. BGP reveals the plumbing, not the faucets.
3. Reverse DNS Hostname Parsing
Many ISPs embed geographic hints in the hostnames assigned to IP addresses. A Comcast IP might resolve to chi-12-34.comcast.net (Chicago), or a British Telecom IP might include lon.bt.net (London). Common codes include IATA airport codes (LAX, JFK, CDG), CLLI telecom codes, and UN/LOCODE transport codes. Providers mine these patterns to extract location signals.
What it tells you: The ISP's internal name for the location, which often corresponds to the city-level point of presence.
Limitation: Not all ISPs use location-based hostnames. Naming conventions vary wildly, and names can be outdated or misleading when ISPs reconfigure without renaming.
4. Active Latency Probing (Multilateration)
Geolocation providers ping target IPs from multiple globally distributed probes (RIPE Atlas has over 10,000 probes worldwide). By measuring round-trip times from known locations and converting latency to maximum possible distance (light in fiber travels at roughly 200 km/ms), they triangulate the IP's approximate position.
What it tells you: A distance constraint — "this IP is within X km of probe Y."
Limitation: Most IPs don't respond to pings (firewalls block ICMP). Routing detours, congestion, and processing delays inflate latency, making the IP appear farther than it actually is. RIPE IPmap achieves 80.6% accuracy within 40 km for European ISPs using this method.
5. User and Partner Telemetry (GPS Ground Truth)
This is the "secret sauce" that separates premium geolocation providers from free databases. Companies like Digital Element collect GPS coordinates from mobile apps and SDKs, then correlate those coordinates with the IP address the device was using at that moment. Digital Element processes data from 1.5 billion mobile devices per 30-day window, generating 60–70 million data points daily.
What it tells you: Actual GPS-verified locations for specific IPs at specific times.
Limitation: Requires partnerships with app developers, raises privacy concerns, and still relies on sampling. Not every IP gets GPS-validated.
6. Geofeeds (RFC 8805)
Published in August 2020, this standard allows network operators to self-publish CSV files mapping their IP prefixes to locations. The format is simple: IP_prefix, country_code, region_code, city, postal_code. Google already incorporates geofeeds into their geolocation pipeline.
What it tells you: The network operator's own declaration of where their IPs are used.
Limitation: Adoption is growing but still far from universal. Most small ISPs don't publish geofeeds yet. There's no verification mechanism — operators could publish inaccurate data.
Accuracy: Vendor Claims vs. Independent Research
Geolocation providers publish their own accuracy figures. Independent researchers test them against GPS ground truth. The numbers don't always agree.
What the Providers Claim
| Provider | Country | City | Notes |
|---|---|---|---|
| MaxMind GeoIP2 | 99.8% | ~66% (US, 50 km) | State ~80% (US). Updates weekdays. |
| IP2Location | 99.5%+ | 76% (US, 50 mi) | Singapore 91%, Congo DR 35% |
| DB-IP | Not published | Not published | 47M+ blocks, 215K cities |
| Digital Element | 99.9%+ | 97%+ | GPS-validated. Enterprise pricing. |
What Independent Research Found
Independent studies tell a more nuanced story:
A University of Chicago study used actual GPS coordinates from smartphones as ground truth. For fixed-line connections in major US cities, MaxMind's median error was 2.62 km in New York, 3.31 km in Chicago, and 4.02 km in Philadelphia. That's impressively precise for broadband. But the same study found that paid database versions were often not significantly more accurate than free versions.
A deep dive published in IEEE TMC analyzed over 2 million location samples across Spain, France, and Great Britain. Their findings were less encouraging: 33–80% of samples were assigned to the wrong administrative region, and cellular IP accuracy within 1 km was only 3% in France.
An independent comparative study by ipapi.is (January 2026) tested 10 API providers using GPS ground truth from over 2,000 residential IPs. Country-level accuracy averaged ~92% across providers. City-level accuracy (within 50 km) ranged from 50% to 75%. At neighborhood level (within 10 km), accuracy dropped to 15–35%.
Five Ways Geolocation Fails
1. CGNAT: Thousands of Users, One IP
Carrier-Grade NAT (CGNAT) allows hundreds or thousands of subscribers to share a single public IPv4 address. Your mobile carrier almost certainly uses it. When a geolocation service looks up that shared IP, it gets the location of the carrier's NAT gateway, which might be in a different city — or a different state.
CGNAT usage is accelerating as IPv4 addresses become scarcer. In Africa, Southeast Asia, and increasingly in North America, mobile users' real locations can differ from their geolocated locations by hundreds of kilometers. Cloudflare has documented the challenge of even detecting when an IP is behind CGNAT.
2. Starlink and Satellite Internet
Starlink has over 4 million subscribers globally, and standard IP geolocation often fails for them. The IP address identifies the ground station the satellite connects to, not the user's location. Ground stations can serve areas spanning hundreds of miles. Starlink's inter-satellite laser links can route traffic to exit the constellation far from the subscriber.
Starlink officially acknowledges this problem. A Starlink user in Montana might geolocate to a ground station in Washington state. As satellite internet grows, this failure mode will affect more users.
3. IPv6: The Accuracy Gap
IPv4 addresses have been assigned and tracked for decades. IPv6 is newer, and the geolocation databases haven't caught up. Research from Radboud University found that IPv4 geolocation achieves ~90% country-level accuracy while IPv6 drops to just 40–60%.
As global IPv6 adoption climbs past 40%, a growing share of internet traffic is geolocated less accurately than users expect. The accuracy gap is narrowing, but it remains significant.
4. VPNs and Proxies
An estimated 31% of internet users worldwide use a VPN. For those users, geolocation returns the VPN exit node's location — which is the entire point. Corporate split-tunnel VPNs, cloud-based secure web gateways (Zscaler, Cisco Umbrella), and Tor exit nodes all mask the user's real location.
Geolocation providers now maintain databases of known VPN and proxy IP ranges (our VPN detector uses these). But it's an arms race: VPN providers rotate IPs frequently to avoid detection.
5. Mobile Networks and Roaming
Cellular carriers route traffic through regional gateways that can be far from the user. A T-Mobile subscriber in rural Montana might exit through a Denver gateway. When roaming internationally, traffic often routes back to the home carrier's infrastructure in the subscriber's home country, making the user appear to be at home when they're on another continent.
The IEEE TMC study found that cellular IP accuracy within 1 km was only 3% in France, compared to 17% for WiFi/broadband in Spain. The difference is an order of magnitude.
Who Uses IP Geolocation and for What
IP geolocation powers more of the internet than most people realize:
- Content delivery networks (CDNs) use it to route users to the nearest server, reducing latency. Cloudflare, Akamai, and AWS CloudFront all depend on IP geolocation.
- Streaming services use it for geographic content licensing. Netflix, Disney+, and sports broadcasters enforce regional restrictions based on viewer IP location.
- Ad tech uses it to serve location-relevant ads. "Pizza shops near me" targeting depends on IP geolocation when GPS isn't available.
- Fraud detection systems flag transactions where the billing address is in one country but the IP geolocates to another. Banks and payment processors use it as a risk signal.
- E-commerce uses it for automatic currency selection, language defaults, tax jurisdiction, and shipping estimates.
- Cybersecurity teams use it to detect anomalous access patterns: a user who was in London an hour ago shouldn't be logging in from Lagos.
- Website owners and marketers pair it with a tracking link to log visitor IPs and see which countries and cities their traffic actually comes from.
- Law enforcement uses IP geolocation as an investigative lead (not proof) to narrow a suspect's location before requesting subscriber records from the ISP with a court order.
- Compliance teams use it to enforce sanctions and export controls, blocking access from embargoed countries.
Legal Status: When an IP Is Personal Data
Whether an IP address is "personal data" has significant legal implications for anyone collecting or processing them.
European Union (GDPR)
The Court of Justice of the European Union settled this in Breyer v. Germany (Case C-582/14): IP addresses are personal data, even dynamic ones, because the ISP can combine them with other data to identify individuals. Under GDPR:
- Any IP collection requires a lawful basis under Article 6 (consent, legitimate interest, legal obligation, etc.)
- You must disclose IP collection in your privacy policy
- Users have the right to access, rectify, and delete their IP data
- Non-compliance: fines up to 4% of annual global turnover or €20 million
California (CCPA/CPRA)
IP addresses are classified as "personal information" under the California Consumer Privacy Act. California residents can request disclosure, deletion, and opt-out of sale of IP-derived data.
United States (Federal)
There is no blanket federal classification of IP addresses as personal data. However, IPs are treated as personally identifiable information in specific contexts: HIPAA (healthcare), FERPA (education), COPPA (children), and various FTC enforcement actions.
The Future: Geofeeds and RFC 8805
The biggest structural improvement to IP geolocation accuracy is RFC 8805, published in August 2020, which creates a standard for ISPs to self-publish geolocation corrections.
Instead of geolocation providers guessing where an ISP's IPs are used, the ISP publishes a CSV file that says "these IP prefixes are in this city." The geofeed is referenced from the ISP's WHOIS record at the relevant RIR, creating a verifiable chain of authority.
Google already incorporates geofeeds into their geolocation pipeline. As adoption grows, the most persistent source of geolocation error — ISPs whose IP assignments don't match registry data — will gradually resolve itself. But "gradually" is the operative word: most small and regional ISPs haven't published geofeeds yet.
Frequently Asked Questions
How accurate is IP geolocation?
Country-level: 99.8% (MaxMind). City-level: 50–75% within a 50 km radius, depending on provider, country, and connection type. Independent research from the University of Chicago found median errors of 2–4 km in major US cities for broadband connections, but cellular accuracy is significantly worse.
Can IP geolocation find my exact address?
No. IP geolocation returns an approximate area — typically a city or region. It identifies where your ISP routes traffic, not your physical street address. Only your ISP can connect an IP to a specific household, and they require a court order to disclose that information.
Why does my IP address show the wrong city?
Common causes: your ISP routes traffic through a hub in another city (especially on mobile), you're behind CGNAT where thousands of users share one IP, your ISP transferred IP blocks from another region without updating databases, you're using a VPN, or you're on Starlink/satellite internet where geolocation maps to the ground station.
Is my IP address personal data?
In the EU, yes — confirmed by the Court of Justice in Breyer v. Germany. In California, yes under CCPA. At the US federal level, it depends on context and applicable sector-specific regulations. When in doubt, treat IPs as personal data and handle them accordingly.
How often do geolocation databases update?
MaxMind updates every weekday. DB-IP updates tens of thousands of records daily. IP2Location publishes monthly releases. Without updates, accuracy degrades 1–5% per month as ISPs reassign IP blocks and networks change.
Try IP Geolocation Yourself
Enter any IP address to see its geolocation data — country, city, ISP, coordinates, timezone, and more — powered by a commercial-grade database with over 47 million address blocks.
Look Up an IP AddressSources: Statistics cited in this article are sourced from MaxMind GeoIP2 Accuracy, IP2Location Data Accuracy, DB-IP, Digital Element NetAcuity, University of Chicago GPS-Based Geolocation Study, IEEE BalkanCom 2023, IEEE TMC Deep Dive, ipapi.is Comparative Study, RFC 8805, ACM Reverse DNS Geolocation, Cloudflare CGNAT, APNIC Starlink Geolocation, and Radboud University IPv6 Accuracy Study.