If you have a question that isn't covered here, please contact us and ask.
It depends on your needs. There are three main considerations.
Our web service has had very good uptime - 99.97% since October of 2002 - and responds quickly, but with a local copy of the database you are not dependent on the availability of our servers or a specific network route. Also, you can perform many more queries per second with a local database.
You need to download GeoIP databases yourself in order to have access to the latest and most accurate GeoIP data. With the web service, MaxMind maintains these databases on our servers. You always receive the latest data available.
Once you have purchased a license to a downloadable database, there is no limit on the number of queries you can perform on that database. Based on the number of queries you are doing per month, you may find that either the downloadable databases or the web services are less expensive.
MaxMind tests the accuracy of the GeoIP Databases on a periodic basis. In our recent tests, the GeoIP databases tested at 99.8% accurate on a country level, 90% accurate on a state level in the US, and 83% accurate for cities in the US within a 40 kilometer radius. For more details on our city coverage, see our GeoIP City coverage and accuracy page.
We cover all of the IPv4 space, including all publicly available IP addresses. Note that some IP addresses may not be in use or may be reserved for private networks. These addresses are not geolocatable. For example, the IP address 127.0.0.1 is used by each computer to refer to itself, so it cannot be geolocated.
We support country-level IPv6 for our GeoIP and minFraud web services. For information on support in our other products, please see our IPv6 page.
Please see our page describing IP allocation details
The ISP database generally contains the ISP name. However, when we are not able to obtain the ISP we include the name of the organization the IP address block was assigned to. For example, the ISP database often contains the names of universities instead of the universities' ISPs.
When only the ISP or organization name is available, both the GeoIP ISP and Organization databases return the same value. In such cases, the shared value usually represents the ISP. When both the ISP and organization names are available, the GeoIP ISP and Organization databases return the ISP and organization, respectively.
Please see our GeoIP benchmarks.
Open Proxies are typically compromised "zombie" computers. They are running a proxy service that was installed by a virus or other malware. The owner of the computer is typically unaware that their computer is being used as a proxy, enabling fraudsters to use the legitimate owner's internet connection to send spam, commit credit card fraud, and engage in other illegal activity.
These open proxies change frequently, as home users cycle through IP addresses and as anti-virus software clean up infections. This category also includes legitimate anonymizing services (listed as anonymous proxies) that cycle their IP addresses frequently in an effort to help their clients get around restricted sites or services that block known anonymous proxies.
Given the rate of change in open proxy IP addresses, this dataset is currently not packaged into the GeoIP databases. The GeoIP databases only contain data on the anonymous proxies and satellite providers. To obtain the Open Proxy data, please use the minFraud or proxy detection web services.
These IP addresses are used as anonymizers or VPN services. They are often used to circumvent IP geolocation restrictions. For additional protection from fraud, see our proxy detection service documentation.
These IPs are from Satellite ISPs that provide Internet service to multiple countries. End users on these IPs may be in high fraud risk countries such as Nigeria and Ghana.
The "EU" and "AP" codes are used when a set of IP addresses has end users all over Europe or Asia and Australasia.
Please note "EU" and "AP" codes do not include all IPs covered under those respective regions. Blocking "EU" will only block IPs with the conditions described above. It will not affect all European countries. In other words, to block all IPs in Europe you would need to block each European country individually, as well as the "EU" code.
We offer a CSV file that contains all the cities in the GeoIP City database.
Updates can be downloaded from your account page.
The geoipupdate program automatically downloads the GeoIP databases in the binary format. You can run this program from a cron job to automatically download new databases.
We also provide URLs for automatically downloading GeoIP databases in any format.
Updates are always provided in the form of complete databases.
The C, Java, Perl, and mod_geoip APIs will all reload an updated GeoIP database if the GEOIP_CHECK_CACHE flag is set (CheckCache for mod_geoip).
For other APIs, you can manually check the timestamps for the relevant database files.
You may do this by using the CSV files released by MaxMind that contain city, region, and country names in various languages. The format of each file is documented in the enclosed README file.
In the future, we will provide GeoIP databases that include this data. We hope to have these databases available by the third quarter of 2013.
This initial release is beta and may contain mismatched cities. Over time, we expect to increase both its coverage and accuracy.
We utilize data provided by Geonames, licensed under a Creative Commons Attribution 3.0 License.
With the Apache web server, you can block access for your entire website from specified countries by using our mod_geoip API.
For other web servers, you can block access to dynamic pages by using any one of our APIs.
It is also possible to block traffic at a firewall before it reaches your webserver. The iptables/netfilter's geoip match feature incorporates GeoIP functionality into Linux's firewall software.
If you are using the Apache web server, you can redirect traffic based on the visitor's country, region, or city by using our mod_geoip2 API.
More generally, you can redirect dynamic pages by using one of our APIs. You can write code as part of your site that determines the location of the client's IP address, then have your code redirect the client to another URL based on the GeoIP database data.
Many search engine spiders originate from the United States, so they will see your website as presented to US visitors. To have the search engine spiders index the entire site, you may want to include links to your other country-specific pages on your website.
Transparent proxy servers send HTTP headers including X-Forwarded-For and Client-IP. You may be able to use these headers to determine the true IP address of the proxy user.
However, some clients may be using a proxy to intentionally hide their IP address. In such cases, there is no easy way to pierce the proxy.
We provide a CSV file which maps our region codes to region names. The columns are ISO country code, region code (FIPS or ISO), and the region name.
Our latest C, C#, Java, PHP, Python, and Perl APIs have built-in support for region name lookups.
It is possible to get the actual timezone of a website visitor's computer by using JavaScript. A Google search reveals some useful code samples of how to determine the timezone using JavaScript.
Alternatively, you can use the output of the GeoIP database to estimate the timezone of the user. We provide a text file as well as PHP code for mapping countries, US states, and Canadian provinces to timezones in the IANA time zone database name format (e.g., America/New_York). This format is also known as the "Olson" or "zoneinfo" format.
Our latest C, Java, PHP, Python, and Perl have built-in support for timezone lookups as well.
The recommended method is to use the Accept-Language HTTP header to get the visitor's language preferences.
As a fallback, you can use the GeoIP Country database to first determine the country, then select the language based on the country returned from the database. You should always use the Accept-Language header if it is present. For example, a Canadian living in Japan may have a Japanese IP address, but their browser will probably be configured to request English.
About 56% of GeoIP City records in the United States have postal codes. We also have postal code records for some IP addresses in Canada and Germany. We cannot identify the postal code in some cases where we can identify the city because cities often have multiple postal codes. We don't identify the postal code in such cases unless we are confident that the IP address is likely to be in that postal code and not one of the others in the city.
Not being able to determine the postal code in many cases is a general limitation of IP geolocation services. An ISP will typically connects users to a central office and assigns them an IP address from a block of IP addresses. This block of IP addresses will be given out to clients spanning several postal codes and these IP addresses may be reallocated across that area on a periodic basis.
If accuracy is not a major concern, there are several possible solution. With a postal code database you can look up a US postal code using the city and state returned by the GeoIP City database. Alternatively, you can use the GEO-132 binary format (without metro and area codes) of GeoIP City, which contains postal codes for every US city-level resolution, even when we aren't confident in the accuracy of the postal code. For the CSV format, we have a location file with postal codes for every US city record.
GeoNames provides worldwide postal code databases.
There are open source postal code distance calculators that can find postal codes within a specified distance of another postal code. Geo::PostalCode is a Perl module available on CPAN, and Zipdy is available in C, PHP, and Perl.
WonderProxy provides a commercial service with HTTP proxies around the world to help you test GeoIP-based web applications.
If IP addresses between 128.0.0.0 and 225.255.255.255 are missing, please check that your beginIPNum and endIPNum database columns are large enough. Defining those columns as UNSIGNED INT may resolve the issue.
Search engine spiders may be crawling your site and depleting your GeoIP web service queries. The robots exclusion standard may help prevent search engines spiders from doing so.
You can write code to check the User-Agent header for the client to see if it's a spider.
If you implemented the robots exclusion standard and still are seeing queries being used up faster than expected, we recommend logging each request to our web service in order to better understand what is causing your code to make a web service request.
We will send a warning email when your remaining queries for the GeoIP web service falls below 10,000.