What Is IP Geolocation and How Does It Work?

IP geolocation is an estimate of where an internet connection appears to be based on its public IP address. A lookup service compares that address with a location database and may return a country, region, city, or broader area. The result describes the network address seen by the service. It is not a GPS reading from your device or a verified street address.
Websites can use IP geolocation to choose a regional version of a page or group visits by country. The same process can supply the city shown beside an IP address in a lookup result. The estimated area depends on the database and the connection, so a city label does not establish where a particular person is.
What an IP Lookup Returns
A typical lookup begins with a public IPv4 or IPv6 address. The geolocation service searches its database for a record covering that address and returns the available location fields. A record can cover a range of addresses rather than one device. Country, subdivision, city, approximate coordinates, and time zone are common fields; a subdivision is an administrative area such as a state or province.
Available details vary by product and by address. A country database does not supply the same detail as a city database, and even a city database may have only a country estimate for some addresses. A blank city field means that no city was returned, not that the connection is outside a city. Some addresses have no matching record in a particular database, so the lookup cannot return any location data.
Some products also show an accuracy radius or a confidence measure. The radius describes how far the estimated area extends from the supplied coordinates; it is not a circle centered on a detected device. A confidence value expresses how certain the provider is about a particular field. Neither a small radius nor a high confidence value turns an estimate into proof of a device's position.
A network operator may register an address block in one country while the connection using an address appears in another. A database can therefore return a registered country separately from the estimated country of use. The registered country describes an administrative record, so substituting that value for the estimated location can give the wrong impression.
How Geolocation Databases Are Built
IP addresses do not contain city names or geographic coordinates. Geolocation companies collect evidence that links addresses to places and combine the evidence into database records. Network operators can contribute a geofeed: a published list that associates address ranges, also called prefixes, with countries, regions, or cities. The geolocation company still needs to check that the publisher is responsible for the address range and compare the claimed locations with other evidence.
Registration records can identify the organization responsible for an address range. The organization's office address may help explain who manages the range, but the office is not necessarily where the network's customers connect. An internet provider can serve several areas from one administrative office. Registration information is therefore one possible source of evidence, not a complete location database.
Other evidence can include routing observations, reverse DNS names, and network measurements. Reverse DNS associates an address with a hostname, which may contain a city or airport code. Network measurements can help a geolocation company check whether a proposed location is plausible, for example by comparing response times from known locations. A stale hostname or an indirect network path can complicate the interpretation, so providers use their own methods to weigh the evidence.
Why Results Differ or Change
Address blocks can be reassigned, moved to different networks, or used in new areas. Network operators can update their geofeeds and other published information, but geolocation companies do not all receive or process those changes at the same time. Two databases can therefore return different cities for the same address. A website using an older database copy may also keep showing an earlier estimate.
The connection itself can change the address being looked up. A phone may switch between Wi-Fi and mobile data without moving, then receive a different location estimate.
Several devices on a home network can share a public IPv4 address through the router. A mobile carrier can share an address among many customers spread over a wider area, making a single city less useful as an estimate.
For traffic sent through a VPN or proxy, a website normally sees the intermediary server's public address. An IP lookup then estimates the location associated with that address, which can differ from the device's location. A carrier can also route mobile traffic through infrastructure far from the phone. The area shown by the lookup depends on the address visible to the website, not simply on where the phone is being held.
Anycast creates another complication: servers in different places can use the same IP address. Connections to that address may reach different servers according to network routing. A single city cannot describe every server using the address, so a geolocation service may flag the address as anycast or omit its location.
What IP Geolocation Cannot Establish
An IP location estimate does not identify a subscriber, household, or individual. Public addresses can be shared, reassigned, or used by intermediaries. A map pin marks the database's coordinates for an estimated area; a nearby house or business on the map is not evidence that the connection came from that building.
A website may also know a location from a signed-in account or from a device location request. A browser or operating system can use GPS, nearby Wi-Fi networks, and other signals to supply a device position. Those additional sources can explain why a website shows a more specific location than an IP lookup does. The specific location should not be attributed to the IP address alone.







