IP Geolocation Accuracy: How It Works and Where It Fails
IP geolocation is the technology of determining the geographic location of a device by its IP address. It is used everywhere: for targeted advertising, content localization, fraud prevention, license restriction enforcement, and visitor analytics. But how accurate is this technology, and where does it fail?
How IP Geolocation Works
Data Sources
GeoIP database providers collect information from multiple sources:
- RIR registries — Regional Internet Registries (RIPE NCC, ARIN, APNIC, LACNIC, AFRINIC) maintain databases of IP address allocations. Each IP block is assigned to an organization with a country designation
- ISP data — Internet Service Providers supply information about the geographic distribution of their IP ranges
- Active measurements — route tracing (traceroute), latency measurement from known points, Wi-Fi positioning
- User data — aggregated information from applications that use GPS and Wi-Fi for location determination
- BGP routes — analysis of route announcements helps determine which networks the traffic passes through
How a Query Works
The process of determining location by IP address is straightforward:
- The application obtains the user's IP address
- The IP address is sent to a GeoIP database (local or via API документацию)
- The database finds the range that contains the address
- Location information is returned: country, region, city, coordinates, ISP, ASN
You can check the geolocation of any IP address using the IP Geolocation tool on enterno.io.
Accuracy Levels
Country Detection
Country detection accuracy is the highest. Leading providers (MaxMind, IP2Location, DB-IP) achieve 95–99% accuracy. Errors are most often caused by:
- IP addresses registered in one country but used in another
- Satellite internet providers (Starlink, Viasat)
- Mobile carriers with international roaming
Region and City Detection
City-level accuracy is significantly lower — from 50 to 80% depending on the country and provider. Accuracy is higher in major cities and lower in rural areas.
| Level | Typical Accuracy | Margin of Error |
|---|---|---|
| Country | 95–99% | Minimal |
| Region/State | 70–90% | Neighboring region |
| City | 50–80% | 10–50 km |
| Postal code | 30–60% | Neighboring area |
| Exact coordinates | Low | Points to the city/area center |
Coordinates
GeoIP databases return coordinates (latitude and longitude), but these are not the user's exact location. Typically, the coordinates point to the geographic center of the city or district where the ISP is located. Never use GeoIP coordinates to determine an exact address.
Factors That Reduce Accuracy
VPN and Proxies
A VPN (Virtual Private Network) masks the user's real IP address, replacing it with the VPN server's address. If a user in New York connects through a VPN server in Amsterdam, GeoIP will identify their location as the Netherlands.
It is estimated that 25 to 35% of users regularly use VPNs. This significantly reduces the reliability of IP geolocation for any service.
Types of proxies that affect geolocation:
- VPN services — NordVPN, ExpressVPN, WireGuard, and others
- Corporate VPNs — employees exit through the office IP
- Tor — multi-layer encryption, exit node in a random country
- Residential proxies — use real users' IPs, difficult to detect
- CDNs and reverse proxies — Cloudflare, AWS CloudFront substitute their own IPs
Mobile Networks
Mobile carriers often use centralized internet exit points. A user may be in Vladivostok, but their traffic is routed through Moscow. GeoIP will show Moscow.
Additionally, mobile carriers actively reuse IP addresses through CGNAT (Carrier-Grade NAT), where thousands of users share a single IP address.
Cloud Providers
Cloud servers (AWS, Google Cloud, Azure, Yandex Cloud) have data center IP addresses. If your application uses server-side rendering or a server-side proxy, you may receive the data center's IP instead of the user's IP.
Outdated Data
IP addresses can change owners and geographic assignments. GeoIP databases are updated with a delay — from one week to several months. During this period, old data may be incorrect.
Popular GeoIP Providers
MaxMind GeoIP2
The most well-known GeoIP data provider. Offers the free GeoLite2 database and the commercial GeoIP2 with improved accuracy. Updates every 1–2 weeks.
IP2Location
An alternative to MaxMind with various database tiers. Offers additional data: connection type (mobile, broadband), proxy and VPN detection.
ip-api.com
A free API for non-commercial use. Limit — 45 requests per minute. Convenient for testing and small projects. This is the service used in the IP Geolocation tool on enterno.io.
ipinfo.io
A modern API with additional data on ASN, IP-owning company, and usage type (hosting, VPN, proxy). Free plan — 50,000 requests per month.
Legal Aspects
In several jurisdictions, an IP address is considered personal data:
- GDPR (EU) — an IP address is explicitly classified as personal data. Processing requires a lawful basis
- Federal Law 152-FZ (Russia) — an IP address may be recognized as personal data in a context that allows user identification
- CCPA (California) — an IP address falls within the definition of personal information
When using GeoIP, make sure your privacy policy discloses the collection and processing of IP addresses.
Practical Applications
Content Localization
Automatic language and currency selection based on the user's country. Always provide a manual override option — GeoIP can be wrong.
Anti-Fraud
Detecting suspicious transactions when the IP location doesn't match the shipping address or bank card country. Effective at the country level, unreliable at the city level.
License Restriction Compliance
Blocking content for specific regions (geo-blocking). Keep in mind that VPNs allow users to bypass such restrictions.
Analytics and Targeting
Determining audience geography for advertising campaigns. At an aggregate level (country, region), the data is reliable enough for marketing decisions.
Best Practices
- Use GeoIP to improve UX, but not for critical decisions
- Always give users the option to override automatic selection
- Trust data at the country level; use city-level data with caution
- For financial decisions, combine GeoIP with other verification methods
- Account for VPN traffic — up to one-third of users may be using a VPN
- Regularly update your GeoIP database
- Handle errors gracefully — the GeoIP service may be unavailable
- Comply with personal data legislation requirements
Try It Yourself
Check the geolocation of any IP address with the enterno.io IP Geolocation tool — find out the country, city, ISP, and coordinates.
Check your website right now
Check now →