There has been a Geo-IP database lookup function available since EPiServer CMS 6 R2 was released. Recently I wanted to update to the very latest version of the Geo-IP database to ensure a client's site targeted countries as accurately as possible.

EPiServer distribute the MaxMind database to enable the Geo-IP lookup functionality so I needed to obtain the very latest version of the database. Turns out it is quite simple to update:

  • Browse to: http://www.maxmind.com/app/geolitecity
  • Look for the "Download the latest GeoLite City Binary Format" link and download GeoLiteCity.dat.gz
  • Uncompress the file to your local machine
  • Copy to %PROGRAMFILES%\EPiServer\Framework\6.2.267.1\Geolocation\GeoLiteCity.dat overriding any existing file

That should be it, though you will probably need to restart your site for the new database to take effect.

If you wanted to put the file somewhere more covienient for example to to aid source control and/or distribution then its possible to change the location of the geo-ip database file by changing the following setting in EPiServerFramework.config:


  ...
  
    
      
    
  

Feedback

I'd be happy to hear any feedback on the comments below or @davidknipe

Update

Paul Smith from EPiServer has created a scheduled job to do this as @ev2000 mentioned in the comments. See his post Automatically updating the Geo-IP database.


Comments

Recommendations for you