Skip to content

IP Address Lookup

The following is for informational purposes only

IP Address Location

IP Address Location

What is IP Geolocation?

IP-based geolocation uses the IP address to find the real-world geographic location of a computer, or a mobile device connected to the internet. Although not always 100% accurate, it can map IPv4 or IPv6 addresses to the continent, country, state, region, city, Internet Service Provider (ISP), area code, postal code, latitude and longitude, time zone, the organization assigned to the device, and other information.

To identify the user's location through IP-based geolocation, all that someone needs is the target's IP address (which is very simple to obtain through a basic PHP script) and a geolocation lookup or IP lookup tool to canvass the registration and contact information from public databases.

How Does IP Address Location Work?

How Does IP Address Location Work?

Whenever a device connects to the internet, it sends along with its unique IP address. To map IP addresses to a geographic area, geolocation services must extract data from various IP databases, such as:

  • Regional Internet Registries (RIRs) – a primary source of information, RIRs are large, official organizations in charge of managing and allocating IP addresses in precisely delimited regions of the world.
  • Internet Service Providers (ISPs).
  • User-submitted geographic location data through websites.
  • Free IP geolocation databases (IP2Location Lite, GeoLite2, IP API).
  • Paid databases from IP geolocation database providers (IPligence, Geo Targetly, IP2Location).

When someone visits a website, their internet browser sends an HTTP request to the webserver. The request is an IP packet that includes, among other information, the sender's IP address. To make things easier, some apps or websites simply ask their users for their location. Another way of detecting where an IP address is based is through the metadata of user-uploaded photos.

IP Geolocation Accuracy

IP Geolocation Accuracy

IP geolocation accuracy depends on data acquisition timeliness via third-party servicer databases and the amount of data (and supporting data) linked to a specific location. The same IP address can often show different locations, depending on the databases consulted. In the United States:

  • At the country level, the IP geolocation accuracy is over 90%.
  • At the city/town level, the precision falls between 50% and 70%.

When accuracy falls under 50 percent, and privacy stops being a major concern, websites don't even need to request permission from their users to share their location when using it.

Geolocation Data Types

  1. Server-Based Data Collection relies on a device's IP address via Ethernet or a Wi-Fi connection. Server-based detection is the least invasive and is a good alternative for obtaining country-specific data. The disadvantage is that if the visitor's IP is routed through a proxy server (for instance, Virtual Private Network (VPN)), it maps the server's location instead of the visitor's (who can even live on an entirely different continent).
  2. Device-Based Data Collection is a geolocation method that uses cellular networks and GPS. As long as mobile devices (tablets, smartphones, smartwatches, fitness trackers, or laptops) have the location-based services enabled, cell network signal, and a GPS chip, IP location can be tracked via GPS-tower-device triangulation. Therefore, data accuracy rises with the population density due to higher proximity triangulation.
  3. Combined Data Collection cross-references the two methods above, considering that neither of them is 100% accurate and sometimes, it's best to have at least some data rather than none, to begin with.

Common Applications for IP-Based Geolocation

Common Applications for IP-Based Geolocation

By helping to locate online visitors, IP-based geographical location has become an almost indispensable business tool with a wide range of use cases, such as the following:

  • Serve targeted offers and localized ads – Geolocation improves marketing efforts. Targeted users from one area could be offered a free coffee, and customers who live in a more distant location could receive access to an online music event.
  • Redirect visitors to a page in their language - IP-based geolocation is instrumental in delivering more relevant and targeted content through location-specific landing pages, enhancing the user experience.
  • Leverage traffic logs for analytics - an IP geolocation data service that helps websites learn more about their online visitors by locating login attempts. It also enables them to ban "offending" regions (spam logins from China).
  • Region-specific content customization – Creating tailored shopping experiences with dynamic multi-currency pricing pages (where users can pay in their local currency) or showing relevant business opening hours for the nearest physical location.
  • Translate important messages to the user's language – converting more online visitors into buyers by translating calls to action or titles into their language to reduce the bounce rate and boost the conversion rate.
  • Cybersecurity Protection – Webmasters can count on IP detection to generate firewall blocking scripts for specific countries when they want to ban certain visitors from attacking their servers.
  • Regulatory Compliance – When certain compliance protocols only apply to a limited area, geolocation allows notification of the right users and avoids legal consequences and huge fines (for instance, the GDPR rules for the European Union).
  • Fraud Detection – Online retailers and e-commerce businesses can benefit from geolocation information when detecting when a buyer's IP location is too far away from the billing address, or they've paid with a credit card that belongs to someone living elsewhere.
  • Digital Rights Management – If digital content (music, movies, streaming services) is licensed for a single region, geolocation helps to follow restrictive licensing agreements and display for users from foreign countries a message like "Content not available in your country".

Apart from the advantages mentioned above, IP geolocation services have multiple other uses, such as helping us track a lost phone or discover a new coffee shop close to home. Public services also benefit from geolocation; for instance, law enforcement agencies can locate criminals much easier.

Weaknesses of IP Address Location

Weaknesses of IP Address Location

The scientific approach and the complexity of IP geolocation detection don't mean that it's not susceptible to limitations such as:

  • The IP address can be easily manipulated and changed online through proxy servers.
  • IP based geolocation may not provide accurate users' location every time. For instance, HTML5 geolocation API can supply a GPS-like exact location that is much more precise, although it requires its consent.
  • Dynamic IP addresses (commonly used phones, laptops, and mobile devices) have an ever-changing nature that alters the data.
  • ISPs assign dynamic IP addresses, which leads to inaccuracies (location could be less exact and out of date).

For instance, if a big event occurs in one city, ISP providers might assign IP addresses from less transited locations to that location since it experiences an extremely high demand for internet access through mobile devices. After a few weeks, IP addresses can be switched back to their "home" location or assigned somewhere else.

IP Address Lookup