Internet geolocation

In computing, Internet geolocation is software capable of deducing the geographic position of a device connected to the Internet. For example, the device's IP address can be used to determine the country, city, or ZIP code, determining its geographical location. Other methods include examination of Wi-Fi hotspots,

Data sources
An IP address is assigned to each device (e.g. computer, printer) participating in a computer network that uses the Internet Protocol for communication. The protocol specifies that each IP packet must have a header which contains, among other things, the IP address of the sender.

There are a number of free and paid subscription geolocation databases, ranging from country level to state or city—including ZIP/post code level—each with varying claims of accuracy (generally higher at the country level). These databases typically contain IP address data, which may be used in firewalls, ad servers, routing, mail systems, websites, and other automated systems where a geolocation may be useful. An alternative to hosting and querying a database is to obtain the country code for a given IP address through a DNSBL-style lookup from a remote server.

Some commercial databases have augmented geolocation software with demographic data to enable demographic-type targeting using IP address data.

The primary source for IP address data is the regional Internet registries which allocates and distributes IP addresses amongst organizations located in their respective service regions:


 * African Network Information Centre (AfriNIC)
 * American Registry for Internet Numbers (ARIN)
 * Asia-Pacific Network Information Centre (APNIC)
 * Latin American and Caribbean Internet Address Registry (LACNIC)
 * RIPE Network Coordination Centre (RIPE NCC)

The registries allow assignees to specify country and geographical coordinates of each assigned block. Starting from 2021 RFC 9092 allows assignees to specify location of any IP subnetwork they own.

Secondary sources include:


 * Data mining or user-submitted geographic location data:
 * Website-submitted, e.g. a weather website asking visitors for a city name to find their local forecast or pairing a user's IP address with the address information in their account profile.
 * Wi-Fi positioning system through the examination of neighborhood Wi-Fi BSSID. E.g. Mozilla Location Service.
 * Examination of neighborhood Bluetooth devices.
 * Pairing a user's IP address with the GPS location of a device that's using such an IP address.
 * Data contributed by Internet service providers.
 * Guesstimates from adjacent Class C range and/or gleaned from network hops.
 * Network routing information collected to the end point of the IP address.
 * Analysis of linguistic data from the device, using pre-trained models that show that some term is frequently mentioned in a certain location (e.g. "the T" vs "the El" vs. "the subway").

Accuracy is improved by:
 * Data scrubbing to filter out or identify anomalies.
 * Statistical analysis of user submitted data.
 * Utilizing third-party tests conducted by reputable organizations.

Errors
If geolocation software maps IP addresses associated with an entire county or territory to a particular location, such as the geographic center of the territory, this can cause considerable problems for the people who happen to live there, as law enforcement authorities and others may mistakenly assume any crimes or other misconduct associated with the IP address to originate from that particular location.

For example, a farmstead northeast of Potwin, Kansas became the default site of 600 million IP addresses when the Massachusetts-based digital mapping company MaxMind changed the putative geographic center of the contiguous United States from 39.8333333,-98.585522 to 38.0000,-97.0000. Since 2012, a family in Pretoria, South Africa, has been regularly visited by police or angry private citizens who believed their stolen phones were to be found in the family's backyard. This was also the result of geolocation by MaxMind. The company used the National Geospatial-Intelligence Agency's coordinates for Pretoria, which pointed to the family's house, to represent IP addresses associated with Pretoria.

Privacy
A distinction can be made between co-operative and oppositional geolocation. In some cases, it is in the interest of users to be accurately located, for example, so that they can be offered information relevant to their location. In other cases, users prefer not to disclose their location for privacy or other reasons.

Technical measures for ensuring anonymity, such as proxy servers, can be used to circumvent restrictions imposed by geolocation software. Some sites detect the use of proxies and anonymizers, and may either block service or provide non-localized content in response.

Applications
Geolocation technology has been under development only since 1999, and the first patents were granted in 2004. The technology is already widely used in multiple industries, including e-retail, banking, media, telecommunications, education, travel, hospitality, entertainment, health care, online gaming and law enforcement, for preventing online fraud, complying with regulations, managing digital rights and serving targeted marketing content and pricing. Additionally, the U.S. Federal Communications Commission (FCC) has proposed that geolocation software might be leveraged to support 9-1-1 location determination.

An IP address or the related unique URL may also be investigated with basic functions, typing from the keyboard two instructions: ping and traceroute. In Unix-like systems, they are available as a command line tool. In the same way, Microsoft Windows has the prompt of DOS working with those instructions.

Criminal investigations
Banks, software vendors and other online enterprises in the US and elsewhere became subject to strict "know your customer" laws imposed by the USA PATRIOT Act, the Bank Secrecy Act, the US Treasury Department's Office of Foreign Assets Control and other regulatory entities in the US and Europe from the early twenty-first century. These laws are intended to prevent money laundering, trafficking with terrorist organizations, and trading with banned nations. When it is possible to identify the true location of online visitors, geolocation can protect banks from participating in the transfer of funds for illicit purposes. More and more prosecuting bodies are bringing cases involving cyber-crimes such as cyber-stalking and identity theft. Prosecutors often have the capability of determining the IP address data necessary to link a computer to a crime.

Fraud detection
Online retailers and payment processors use geolocation to detect possible credit card fraud by comparing the user's location to the billing address on the account or the shipping address provided. A mismatch – an order placed from the US on an account number from Tokyo, for example – is a strong indicator of potential fraud. IP address geolocation can be also used in fraud detection to match billing address postal code or area code. Banks can prevent "phishing" attacks, money laundering and other security breaches by determining the user's location as part of the authentication process. Whois databases can also help verify IP addresses and registrants.

Government, law enforcement and corporate security teams use geolocation as an investigatory tool, tracking the Internet routes of online attackers to find the perpetrators and prevent future attacks from the same location.

Geomarketing
Since geolocation software can get the information of user location, companies using geomarketing may provide web content or products that are famous or useful in that specific location. Advertisements and content on a website that uses geolocation software in the form of an API (also referred to as "IP API" or "IP address geolocation API") may be tailored to provide the information that a certain user wants.

Regional licensing
Internet movie vendors, online broadcasters who serve live streaming video of sporting events, or certain TV and music video sites that are licensed to broadcast their videos of episodes/music videos are permitted to serve viewers only in their licensed territories. By geolocating viewers, they can be certain of obeying licensing regulations. Online gambling websites must also know where their customers violate gambling laws, or risk doing so.

Jim Ramo, chief executive of movie distributor Movielink, said studios were aware of the shortcomings going in and have grown more confident now that the system has been shown to work.

Gaming
A location-based game is a type of pervasive game for smartphones or other mobile devices in which the gameplay evolves and progresses via a player's real-world location which is typically obtained by GPS functionality from the device.