ENTRDEESFRPTIT
← All Guides
Guide

IP Geolocation Explained

Understand how IP geolocation works, its accuracy limitations, and how to correct location data using geofeed (RFC 8805). A guide by IPv4Center.

What Is IP Geolocation?

IP geolocation is the process of determining the physical geographic location of a device connected to the internet using its IP address. Modern IP geolocation databases achieve approximately 95–99% accuracy at the country level, 70–85% at the city level, and 50–75% at the postal code level, depending on the provider and region.

Unlike GPS which requires hardware on the device, IP geolocation works entirely through network-side analysis. It maps IP addresses to geographic coordinates by combining data from Regional Internet Registries (RIRs), ISP network infrastructure records, and active measurement probes distributed across the globe.

IP geolocation does not reveal a user's exact street address or physical location. It provides an approximate area — typically a city or metropolitan region — based on where the IP address is registered or where the network infrastructure serving that IP is physically located.

How IP Geolocation Works

IP geolocation relies on multiple data sources and techniques combined to produce a location estimate. No single method is authoritative; providers aggregate signals from various sources to improve accuracy. The primary methods include RIR allocation records, BGP routing analysis, active latency measurements, user-contributed data, and ISP network topology mapping.

Regional Internet Registries (ARIN, RIPE NCC, APNIC, LACNIC, AFRINIC) maintain public records of which organizations hold specific IP blocks and their registered addresses. While this data provides a starting point, registered addresses often reflect headquarters rather than actual deployment locations. BGP routing analysis examines how IP prefixes are announced across the global routing table, revealing which networks and data centers carry traffic for specific IP ranges.

Active latency measurements use distributed probe networks to ping target IPs and triangulate their physical position based on round-trip times. If a probe in Frankfurt gets 2ms latency to an IP while a probe in London gets 15ms, the target is likely near Frankfurt. User-contributed data from apps and websites that collect both IP addresses and GPS coordinates provides ground-truth validation for geolocation databases.

RIR Allocation Data

Public registry records showing which organization holds each IP block and their registered address. The foundation of geolocation mapping.

BGP Routing Analysis

Examining global routing tables to determine which networks and physical locations announce specific IP prefixes.

Active Latency Probes

Distributed measurement networks that triangulate IP locations using round-trip time analysis from multiple geographic points.

ISP Topology Mapping

Mapping ISP infrastructure to determine where specific IP ranges are deployed within their physical network.

IP Geolocation Accuracy Factors

Geolocation accuracy varies significantly based on several factors. Urban areas with dense network infrastructure typically achieve higher accuracy because ISP points-of-presence are more precisely documented and closer to end users. Rural areas may only achieve regional accuracy because fewer network nodes exist, making triangulation less precise.

Mobile IP addresses present a major accuracy challenge. Mobile carriers use Carrier-Grade NAT (CGNAT) to share single IP addresses among thousands of subscribers spread across wide geographic areas. A single mobile IP might serve users in a 100km radius, making city-level geolocation unreliable for mobile traffic.

VPN and proxy services deliberately obscure true user locations by routing traffic through servers in different geographic regions. IP address transfers between organizations can also cause temporary inaccuracies when the new holder deploys addresses in a different location but geolocation databases still reflect the previous owner's location. Legacy allocations from the early internet era may have records that were never updated to reflect current deployment locations.

Mobile / CGNAT

Carrier-Grade NAT shares IPs across wide geographic areas. A single mobile IP may serve users spread over 100+ km.

VPN & Proxy Usage

Traffic routed through remote servers reports the server location rather than the actual user location.

IP Transfers

Addresses moved between organizations may retain outdated geolocation data until databases are updated.

Satellite Internet

Satellite connections route through distant ground stations, causing geolocation to reflect the ground station rather than user location.

Geofeed: Correcting IP Geolocation (RFC 8805)

Geofeed, standardized in RFC 8805, is a mechanism that allows IP address holders to publish authoritative geolocation data for their address ranges. By hosting a simple CSV file at a publicly accessible URL and referencing it in WHOIS/RDAP records, network operators can directly inform geolocation providers where their IP addresses are actually deployed.

The geofeed format is straightforward: each line contains an IP prefix, country code (ISO 3166-1 alpha-2), region code (ISO 3166-2), and optionally a city name, separated by commas. For example: "192.0.2.0/24,US,US-CA,Los Angeles" declares that the /24 block is located in Los Angeles, California, United States.

Major geolocation providers including Google, Cloudflare, MaxMind, and IP2Location actively consume geofeed data and incorporate it into their databases. This means that publishing a geofeed file is the most direct and effective way to correct IP geolocation for your address space. IPv4Center offers a geofeed generator tool that creates properly formatted geofeed files ready for publication.

RFC 8805 Standard

The IETF standard defining the geofeed format, publication mechanism, and cryptographic validation via RPKI signatures.

CSV Format

Simple comma-separated format: IP prefix, country code, region code, city. Easy to generate and maintain.

Provider Adoption

Google, Cloudflare, MaxMind, IP2Location, and others actively consume geofeed data for their geolocation databases.

RPKI Validation

Geofeed files can be cryptographically signed using RPKI to prove the publisher is authorized to make geolocation claims.

Why IP Geolocation Matters

IP geolocation is fundamental to modern internet infrastructure. Content Delivery Networks (CDNs) use it to route users to the nearest edge server, reducing latency and improving load times. Without accurate geolocation, a user in Tokyo might be served content from a server in New York, adding hundreds of milliseconds of latency.

Regulatory compliance increasingly depends on geolocation accuracy. GDPR data residency requirements, content licensing restrictions, and financial services regulations all require knowing where users are located. Fraud detection systems use geolocation to flag suspicious transactions — a credit card used in Germany moments after a transaction in Brazil triggers an alert.

For IPv4 buyers, updating geolocation after an IP transfer is critical for proper service delivery. If you purchase an IP block previously used in Europe and deploy it in Asia, geolocation databases will still report the European location until corrected. This causes CDN misrouting, content restriction errors, and poor user experience for anyone accessing services through those IPs.

CDN Routing

Content delivery networks route users to the nearest server based on IP geolocation, minimizing latency.

Regulatory Compliance

GDPR data residency, content licensing, and financial regulations require accurate user location determination.

Fraud Detection

Transaction monitoring systems flag purchases from unexpected geographic locations as potential fraud indicators.

Post-Transfer Updates

After acquiring IPv4 addresses, updating geolocation ensures proper CDN routing and service delivery for the new deployment.

IP Geolocation Databases and Providers

Several commercial and free geolocation databases are available, each with different accuracy levels, update frequencies, and pricing models. MaxMind GeoIP2 is the most widely used commercial database, offering both free (GeoLite2) and paid tiers with accuracy that varies by region but generally leads the industry for IPv4 lookups.

IP2Location, DB-IP, and ipinfo.io are strong alternatives. IP2Location provides granular accuracy with databases updated daily. DB-IP offers a free tier competitive with GeoLite2 and commercial tiers with additional data fields. ipinfo.io focuses on API-first delivery with real-time lookup capabilities and privacy-detection features that identify VPNs and proxies.

Update frequency directly impacts accuracy. Most providers update their databases weekly to monthly. For organizations that frequently acquire or transfer IP addresses, choosing a provider with more frequent updates — or one that actively consumes geofeed data — ensures that geolocation reflects current deployment rather than historical records.

Frequently Asked Questions

Common questions about IP geolocation answered

IP geolocation achieves 95–99% accuracy at the country level, 70–85% at the city level, and 50–75% at the postal code level. Accuracy depends on the provider, region, and whether the IP is residential, mobile, or commercial. Urban areas are generally more accurate than rural regions.

No. IP geolocation cannot determine your exact street address or physical location. It provides an approximate area, typically a city or metropolitan region. Only ISPs have the ability to map specific IPs to physical addresses, and they do not share this information publicly.

Common causes include: your ISP routes traffic through infrastructure in a different city, you're using a VPN or proxy, your IP block was recently transferred to a new owner in a different location, or the geolocation database has outdated records. Publishing a geofeed file (RFC 8805) is the most effective correction method.

The most effective method is publishing a geofeed file per RFC 8805, which major providers consume automatically. You can also submit corrections directly to providers like MaxMind, IP2Location, and Google. Use IPv4Center's geofeed generator to create a properly formatted file.

Geofeed (RFC 8805) is a standardized CSV file published by IP address holders declaring the geographic location of their address ranges. The file is referenced in WHOIS/RDAP records and consumed by geolocation providers to update their databases with authoritative location data.

Yes. When using a VPN, geolocation services see the VPN server's IP address and report its location, not your actual physical location. This is how VPNs enable users to appear as though they are in a different country.

Most major providers update weekly to monthly. MaxMind updates GeoIP2 twice weekly, IP2Location updates daily, and DB-IP updates monthly. More frequent updates improve accuracy, especially for recently transferred IP blocks.

Need to Fix Your IP Geolocation?

Use our geofeed generator tool to publish correct location data for your IP addresses, or browse the marketplace for IPv4 blocks with verified geolocation.