GeoIP

Also known as: IP geolocation, geolocation

The practice of estimating a physical location (country, region, city) from an IP address by matching it against a database of allocated IP ranges.

Last updated:

What is GeoIP?

GeoIP is the general term for mapping an IP address to a physical location estimate — typically a country, region, and city, sometimes with approximate latitude/longitude and time zone. It works by maintaining a database of allocated IP ranges (by CIDR block) and the locations reported by the owning ISPs and autonomous systems.

GeoIP is used for content localization, fraud detection, ad targeting, compliance (geo-blocking), traffic analytics, and threat intelligence. Every major web platform uses it somewhere in its stack.

How accurate is GeoIP?

Accuracy varies sharply by geographic granularity and connection type:

  • Country-level accuracy: typically 95-99% across commercial databases
  • Region/state-level: 60-85%
  • City-level: 50-80%, with wide variance by country
  • Latitude/longitude: not a precise point — most lookups return the population-weighted centroid of the reported city or region

Accuracy is highest for stable, business-grade IPs (datacenters, large ISPs, enterprise networks) and lowest for mobile carriers (which dynamically assign addresses across large regions) and VPN/proxy services (which reflect the VPN server's location, not the user's).

How GeoIP databases are built

Commercial databases like MaxMind GeoLite2 and DB-IP combine multiple signals:

  • ARIN/RIPE/APNIC/LACNIC/AFRINIC allocation records (who owns what range, and where the owning org is registered)
  • BGP routing data (where the range is announced from on the internet backbone)
  • Probe measurements (latency triangulation from servers around the world)
  • User-reported corrections and ISP disclosures
  • Reverse DNS patterns that encode city or airport codes

Our IP lookup tool cross-references MaxMind GeoLite2 and DB-IP so that gaps in one database can be filled by the other, which produces measurably more complete results than relying on a single source.

Frequently Asked Questions

It does not actually know — it estimates. GeoIP databases combine Regional Internet Registry allocation records (which organization registered which IP block, and where that org is headquartered), BGP routing data (which AS announces the prefix and from where), latency triangulation from probe servers, ISP-supplied location data, and reverse-DNS hostname patterns. The result is a best guess for the city or region most likely to host that IP, not your literal physical position.
The most common reasons: you are on a VPN or proxy (the lookup shows the exit node's location), you are on a mobile carrier or CGNAT pool that aggregates IPs across a wide region, your ISP registered the block at a corporate address far from where the IP is actually used, or the database has not been updated since the block was reassigned. Mobile and CGNAT IPs in particular routinely appear hundreds of miles from the actual user.
For coarse country-level decisions (sanctions screening, GDPR jurisdiction, gambling/age laws), GeoIP at country granularity is usually accurate enough — typically 95-99% — and is widely used for exactly these purposes. For city-level decisions (state-tax sourcing, regional content licensing), accuracy drops to 50-80% and you should layer in stated user address, payment-method country, or device language. Never rely on GeoIP alone for high-value irreversible actions; pair it with additional signals.
MaxMind GeoLite2 and DB-IP Lite are the two largest commercial GeoIP database providers, both with free monthly-updated tiers and richer paid feeds. MaxMind has historically had better US/EU coverage; DB-IP often has better coverage in Asia, Latin America, and Africa. Independent benchmarks generally show them within a few percentage points of each other. Cross-referencing both fills gaps in either — which is why our IP lookup queries both and merges the results.
Yes. All major GeoIP databases include IPv6 ranges, although the coverage and granularity are typically lower than for IPv4 because IPv6 deployment is newer and the historical ISP location data is thinner. IPv6 prefixes are usually allocated in much larger blocks (a /48 for an end customer, vs a /29-/24 for IPv4), so the geographic resolution is often coarser. Accuracy is improving each year as more user data becomes available.