How IP Geolocation Actually Works
An IP address has no GPS coordinates baked into its bits. Unlike a postal zip code, IP prefixes follow network topology rather than geography. Turning an IP like 198.51.100.14 into a city, ISP, and timezone requires combining registry records, routing tables, self-published ISP geofeeds, and active latency measurements.
1. The Foundation: Five Regional Internet Registries (RIRs)
Global IP space is administered by IANA, which delegates large blocks to five Regional Internet Registries. Those RIRs allocate prefixes to ISPs, cloud providers, universities, and enterprises while maintaining public WHOIS/RDAP records documenting the holder's legal country and Autonomous System Number (ASN):
| RIR | Service Region | Primary Database Role |
|---|---|---|
| ARIN | United States, Canada, parts of Caribbean | North American IPv4/IPv6 & ASN allocations |
| RIPE NCC | Europe, Middle East, Central Asia | European & MENA allocations and geofeed pointers |
| APNIC | Asia-Pacific | APAC allocations and national registry coordination |
| LACNIC | Latin America & Caribbean | Regional IP/ASN delegation |
| AFRINIC | Africa | African regional IP/ASN delegation |
Registry data alone is coarse: it often lists a nationwide ISP's corporate headquarters rather than the city where a specific residential subnet terminates. That is why geolocation providers treat RIR data strictly as a baseline and layer multiple dynamic signals on top.
2. Four Signals Used to Narrow Down City-Level Location
- RFC 8805 Self-Published Geofeeds: Modern ISPs and cloud providers increasingly publish a signed CSV file (called a geofeed) referenced in their RIR WHOIS record. Each line explicitly maps a CIDR prefix to an ISO country, region, and city — making geofeeds the single cleanest source of truth when operators maintain them.
- BGP Routing & Peering Topology: By observing Border Gateway Protocol (BGP) announcements across global route collectors (such as RouteViews and RIPE RIS), analysts can trace which regional Internet Exchange Points (IXPs) carry traffic for a prefix.
- Active Latency Multilateration: Light traveling through optical fiber moves at roughly two-thirds the speed of light in a vacuum (~200 km per millisecond round-trip accounting for routing overhead). By pinging an IP from distributed probe vantage points, providers calculate a physical radius that strictly bounds where the responding router can live.
- Reverse DNS (PTR) Hostname Mining: Many ISPs embed airport IATA codes or city abbreviations directly into router PTR names — for example,
cpe-74-102-11-4.lax.example-isp.netstrongly implies Los Angeles.
3. Accuracy Expectations by Connection Type
Geolocation accuracy is not a single percentage; it varies dramatically depending on how the end user connects to the internet:
| Connection Type | Country Accuracy | City Accuracy | Primary Reason for Drift |
|---|---|---|---|
| Fixed Residential Fiber / Cable | 99%+ | 70%–85% | Subnet mapped to ISP's metro aggregation hub |
| Cellular (4G / 5G) | 98%+ | 20%–50% | Carriers egress traffic through centralized Packet Gateways |
| Satellite (e.g., LEO constellations) | 95%–99% | Low | Traffic exits through regional ground stations & PoPs |
| Enterprise / Corporate VPN | Varies | Low | Remote employees tunnel through corporate HQ firewall |
| Consumer VPN / Tor / Proxy | Masked | Masked | IP intentionally reflects the exit server, not the user |
4. The Anycast Edge Case
Try looking up 1.1.1.1 (Cloudflare) or 8.8.8.8 (Google Public DNS) in our IP Analyzer. Those addresses use BGP Anycast: the exact same IP prefix is announced simultaneously from hundreds of data centers on every continent. Your packets reach whichever data center is topologically closest to you, yet a static geolocation database can only assign one set of coordinates (often the operator's headquarters or a default country centroid) to that IP.
5. How Network Operators Fix a Misplaced IP
If your company's static IP block shows up in the wrong country or city (common after transferring legacy IPv4 blocks across regions), individual websites cannot fix it permanently — the upstream databases must be updated:
- Publish an RFC 8805 Geofeed: Host a plain CSV mapping your prefixes to ISO-3166 country/region codes and link it via the
geofeed:remark in your ARIN/RIPE/APNIC record. - Verify PTR Hostnames: Remove stale city codes from reverse DNS records left behind by a previous IP owner.
- Submit Direct Corrections: Major providers (including IP2Location, MaxMind, and Google) maintain correction forms and automated geofeed ingest pipelines that refresh on monthly or weekly cycles.
Related Guides: IP Addressing & NAT Explained | CIDR & Subnetting Guide