ResidentialIPs.org

Glossary IP reputation and detection

IP geolocation

By the ResidentialIPs Editorial TeamUpdated

IP geolocation: IP geolocation estimates the physical location of an IP address, usually to country, region and city, using registry records, network measurements and other data sources.

Also called: GeoIP, IP location, IP to location lookup

Key takeaways

  • No database knows exactly where an IP is; all locations are estimates.
  • Country level is accurate for most IPs; city level is often off by tens of kilometres.
  • Mobile, CGNAT and corporate VPN addresses are the hardest to place.
  • Different vendors give different answers for the same IP.
  • Network operators can publish geofeeds (RFC 8805) to improve accuracy.

What is IP geolocation?

IP geolocation maps an IP address to a location. Websites use it to choose a language and currency, show local prices and results, enforce licensing and geo-blocking, detect fraud (a login from an unusual country) and comply with sanctions. Proxy providers use it to label exits for geo-targeting.

Where the data comes from

SourceWhat it contributes
Registry recordsCountry and organisation of the block holder
ISP and operator geofeedsSelf-published locations per prefix (RFC 8805)
Network measurementsLatency from known points to estimate distance
Reverse DNS hintsCity codes in router and customer hostnames
Device and app dataWi-Fi and GPS signals associated with IPs (in some vendors)
User correctionsSubmissions from operators and users

Major vendors include MaxMind (GeoIP2 and the free GeoLite2), IPinfo, IP2Location, DB-IP and the large CDNs, which maintain their own data.

How accurate is it?

LevelTypical accuracy
CountryHigh for most fixed-line IPs
Region or stateGood in large countries, weaker in small ones
CityVariable; often the ISP’s regional hub
Postcode or streetNot reliable from IP alone

Mobile carriers route traffic through a few regional gateways, so phone IPs often geolocate far from the user. CGNAT and corporate VPNs have the same effect.

Why it matters for proxies

When a provider sells “Osaka” exits, it trusts one database. Your target may use another. If city accuracy matters, look up a sample of exits in the database your target uses and expect some disagreement. Also make sure the rest of your setup agrees: browser time zone, language and the browser’s own geolocation API.

Correcting wrong geolocation

If your own network is mislocated, publish a geofeed, submit corrections to the major vendors, and make sure registry records and reverse DNS reflect the right location. Changes take days to weeks to propagate to the sites that use those databases.

How a geolocation lookup works

A geolocation database is essentially a table of IP ranges, each with a country, region, city, coordinates, an accuracy radius and often the owning network and usage type. A lookup finds the range containing the IP and returns that row. Databases are rebuilt regularly, weekly or daily for commercial products, as providers combine new data.

Data sourceWhat it contributes
RIR registration recordsCountry and organisation of the address block
Self-published geofeeds from networks (RFC 8805)City and region where the network says the range is used
Network measurements such as latency and routingRough physical location
User-submitted corrections and partner dataFixes for specific ranges

Accuracy by level

Country-level data is right for the vast majority of IPs. City-level data is much less reliable, especially for mobile networks, CGNAT ranges and IPs that moved recently. Many lookups return a city near the ISP’s equipment rather than the user. The accuracy radius in a lookup result is a better guide than the city name.

Why proxy users should check several databases

Different websites use different databases. An IP can show as Frankfurt in one and Berlin in another, or even as a different country if it was recently transferred. When a target shows an unexpected location, compare two or three major databases. If they disagree, the target’s database may be out of date and another IP will often work better.

Privacy note

IP geolocation estimates where a network is used. It does not reveal a street address. Only the ISP can link an IP to a subscriber, and it normally does so only under legal process.

Correcting your own IP ranges

If you run a network and lookups show the wrong location for your addresses, publish a geofeed (a simple CSV defined in RFC 8805), reference it in your registry record, and submit corrections to the major geolocation providers through their correction forms. Most update within a few weeks.

Frequently asked questions

Can someone find my home address from my IP?

Not from public IP geolocation, which usually gives a city or region at best. Your ISP knows the subscriber, but releases that only under legal process.

Why does my IP show the wrong city?

Databases often place IPs at the ISP’s regional hub or use outdated data. Mobile and shared addresses are especially imprecise.

Which IP geolocation database is most accurate?

It depends on the country and network. Commercial databases from MaxMind, IPinfo and others are generally more accurate than free versions, but none is exact.

How often does IP geolocation data change?

Commercial databases publish updates weekly or more often. A specific range only changes when the network moves it, transfers it or publishes new geofeed data.

Do websites all use the same geolocation database?

No. Large sites often combine commercial databases with their own data, such as the locations users enter at checkout. That is why two sites can place the same IP in different cities.

Sources and further reading

Browse all 40 glossary terms Markdown version