The GeoIP feature for Acquia Cloud Enterprise and Acquia Cloud Site Factory uses the MaxMind GeoIP2 Country Downloadable Database to identify the country of origin of HTTP requests, based on the request's IP address. The IP address is obtained from the
X-Forwarded-For header or the client IP address if there is no
X-Forwarded-For header. The Acquia Cloud server then adds the two-letter country code (ISO-3166-1 alpha-2) in the
X-Geo-Country header of the HTTP request. If the MaxMind GeoIP Country Downloadable Database can't identify the country from the request IP address, the country code is set to
AA. Your website's backend code can then use the country code in the header to set your visitor's country.
The GeoIP feature supports the MaxMind IPv4 and IPv6 country database. The GeoIP feature requires you to maintain an active subscription to the MaxMind GeoIP2 Country Downloadable Database. It is available for Acquia Cloud Enterprise customers who have dedicated load balancers and is not available for Acquia Cloud Professional or Acquia Cloud Free customers.
The GeoIP feature does not support region- or city-level IP targeting. Targeting at these levels requires custom development, which is available from Acquia as a Professional Services engagement. For a different approach to geographical targeting, see Acquia Lift, which supports targeting specific content on your website based not just on geography, but on a host of other criteria.
Enabling the GeoIP feature
To enable the GeoIP feature, complete the following steps:
- Purchase a GeoIP2 Country Downloadable Database subscription from MaxMind.
- Get your MaxMind GeoIP2 Country Downloadable Database user ID and license key.
- Install and enable the Acquia GeoIP Country variation module.
- Contact Acquia Support and indicate that you want to enable the GeoIP feature for your Acquia Cloud Enterprise or Acquia Cloud Site Factory application. Provide your MaxMind GeoIP2 Country Downloadable Database user ID and license key.
Acquia Support will enable the GeoIP feature for each of your application's environments by including a
addon-geoip.vcl in your application's Varnish runtime. This requires restarting Varnish on your dedicated load balancers, which clears the Varnish cache and can result in reduced performance while the cache is rebuilt.
While your MaxMind subscription is active, Acquia will update the Country Database from MaxMind. Acquia updates MaxMind Country Database instances three times a week. If your subscription ends, Acquia Cloud will continue to add the
X-Geo-Country header, but the value may be inaccurate due to stale data.