IP-based Geolocation is mapping of an IP address or MAC address to the real-world geographic location of an Internet connected to a computing device or mobile device. Geolocation involves in mapping IP address to the country, region (city), latitude/longitude, ISP and domain name among other useful things.
2. Where can I get a IP-based Geolocation database?
There are a number of commercially available geolocation databases, and their pricing and accuracy may vary. Ip2location, MaxMind, Tamo Soft and IPligence offer a fee based databases that can be easily integrated into an web application. Most geolocation database vendors offers APIs and example codes (in ASP, PHP, .NET and Java programming languages) that can be used to retrieve geolocation data from the database. We use Ip2Location database to offer a free geolocation data on our website.
There are also freely available geolocation databases. Vendors offering commercial geolocation database also offer a Lite or Community edition that provides IP-to-Country mappings. Ip2Country.net and Webhosting.info (Directi) offer free IP-to-Country database that can be also integrated into your web application. There are companies also offering free web services that can be used to show geolocation of an IP address on your website.
3. How accurate is IP-based Geolocation?
Accuracy of geolocation database varies depending on which database you use. For IP-to-country database, some vendors claim to offer 98% to 99% accuracy although typical Ip2Country database accuracy is more like 95%. For IP-to-Region (or City), accracy range anywhere from 50% to 75% if neighboring cities are treated as correct. Considering that there is no official source of IP-to-Region information, 50+% accuracy is pretty good.
4. How does IP-based geolocation work?
ARIN Whois database provides a mechanism for finding contact and registration information for IP resources registered with ARIN. The IP whois information is available for free, and determining the country from this database is relatively easy. When an organization requires a block of IP addresses, a request is submitted and allocated IP addresses are assigned to a requested ISP.