Why IP Geolocation Matters
IP geolocation gives every website and link a location signal without asking the visitor for permission. The address arrives with each request, so it works on any device, app, or browser.
- Analytics. Google Analytics derives city, region, country, and continent from the IP address.
- Ad targeting. Google Ads lists the IP address as one of the signals it uses to judge physical location.
- Link routing. A geo targeting link uses the result to send each visitor to a matching page.
- Fraud and compliance. A mismatch between billing country and IP country is a common risk flag.
How IP Address Geolocation Works
An IP address contains no location. Providers build a separate map of which network ranges are used where, and a geolocation lookup reads that map.
- Ranges are assigned. Regional internet registries allocate address blocks to internet providers and companies.
- Providers collect evidence. Sources include registry records, traceroutes, and geofeeds. A geofeed is a public file, defined in RFC 8805, where a network operator lists its own ranges and their locations.
- A database is compiled. Each range gets a country and, where evidence allows, a region, city, coordinates, and accuracy radius.
- The lookup runs. A server takes the visitor’s address, finds the matching range, and returns the stored location.
This is a shortened ipinfo.io response for 8.8.8.8, Google’s public DNS address:
{
"ip": "8.8.8.8",
"city": "Mountain View",
"region": "California",
"country": "US",
"org": "AS15169 Google LLC",
"anycast": true
}
The anycast flag matters. Servers in many countries answer on this one address, so “Mountain View” describes the owner and not the machine that replied.
How Accurate IP Geolocation Is
Country results are reliable. City results are estimates. These are MaxMind’s published figures:
| Level | Accuracy stated by MaxMind |
|---|---|
| Country | Over 99%, especially when VPN traffic is excluded |
| State or region | Typically 55% to 80%, depending on the country |
| City | Typically 20% to 75% |
| City in the US, within 50 km | Estimated 66% |
Networks that publish their locations score far better. A test on 25 November 2026 checked 40 public addresses: 30 from Starlink’s geofeed, one per country, and 10 from AWS’s published regions. Both MaxMind GeoLite and ipinfo.io returned the right country for all 40. Ignoring spelling variants, only one city differed: ipinfo.io placed a Baku address in nearby Khirdalan. Home broadband and mobile networks are harder cases that the test did not cover.
When IP Location Is Wrong
Most errors happen because the address belongs to something other than the visitor’s own connection.
- VPNs and proxies. The lookup finds the VPN server, not the person.
- Mobile networks. MaxMind notes that a mobile IP may move between users hundreds of kilometers apart within minutes.
- Corporate networks. Remote staff can appear at the office where their traffic exits.
- iCloud Private Relay. Apple replaces the address with a shared one that matches the user’s coarse city-level location by default.
- Cloud and CDN addresses. If your server sits behind a proxy and reads the wrong header, every visitor appears to be at the proxy.
- Stale records. Blocks get sold or reassigned before databases catch up.
Plan for unknowns as well. Cloudflare’s country header returns XX when it has no data and T1 for Tor traffic.
IP Geolocation vs Browser Geolocation
IP geolocation is silent and approximate. Browser geolocation is precise and needs consent.
| IP geolocation | Browser Geolocation API | |
|---|---|---|
| Source | Network address | Device data such as GPS and Wi-Fi |
| Permission prompt | No | Yes |
| Typical precision | Country to city | Can reach street level |
| Works without JavaScript | Yes | No |
| Best for | Reports, routing, defaults | Maps, delivery, store finders |
How to Use IP Lookup Data in Marketing
Treat IP location as a default, never as proof of where someone is.
- Report by country or region first. Use city data for trends, not for small-sample decisions.
- Let visitors override it. Google’s guidance calls IP location analysis “difficult and generally not reliable” and advises against using it to adapt content.
- Set a fallback. Send unknown locations to a global page.
- Avoid household claims. MaxMind says its coordinates should not be used to identify a particular address or household.
- Expect mismatches between tools. Two platforms using different databases will report different city totals for the same clicks.
Frequently Asked Questions
What is an IP lookup?
An IP lookup is a query that returns the information recorded about an IP address. A geolocation lookup returns the estimated location. A WHOIS or RDAP lookup returns the registered owner of the block, which may be in a different country from the user.
Can IP geolocation find an exact address?
No. IP geolocation identifies an area, not a building. Databases often place the point near the center of a population area and attach an accuracy radius. Only the internet provider can link an address to a subscriber, usually after a legal request.
Why does my IP location show the wrong city?
Your IP location shows the wrong city when the database links your address range to another place. Common causes are a VPN, a mobile carrier routing traffic through a distant hub, or an outdated record. Many providers accept correction requests.
Is IP geolocation legal under GDPR?
Yes, with conditions. EU law generally treats IP addresses as personal data, so processing them needs a lawful basis and a disclosure. Deriving a coarse location and discarding the address lowers the risk. Google says Analytics does this for EU, Swiss, and UK traffic.
Is free IP geolocation data good enough?
Free data usually works for country-level reports. MaxMind describes its free GeoLite City data as “considerably less accurate” than its paid version and does not recommend it for commercial use. Use paid data when city results drive spending or fraud decisions.
To see which countries and cities your campaign clicks come from, open the geographic heatmap in linkutm’s link analytics.