Information for: DEVELOPERS   PARTNERS

Using GeoIP information

The GeoIP feature is available for Acquia Cloud Enterprise and Acquia Cloud Site Factory subscribers who have dedicated load balancers. It isn’t available for Acquia Cloud Professional or Acquia Cloud Free subscribers.

The GeoIP feature for Acquia Cloud Enterprise and Acquia Cloud Site Factory uses the MaxMind GeoLite2 City Database to identify the country of origin of HTTP requests, based on the request’s IP address. The GeoIP feature obtains the IP address 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 GeoLite2 City Database can’t identify the country from the request IP address, it sets the country code to AA. Your website’s back-end 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 doesn’t 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 only on geography, but on additional criteria.

For a client-side application, instead of an Acquia Cloud-based solution, see the MaxMind GeoIP2 JavaScript Client API. Contact MaxMind for more information.

Enabling the GeoIP feature

To enable the GeoIP feature, contact Acquia Support to request Acquia enable the GeoIP feature for your Acquia Cloud Enterprise or Acquia Cloud Site Factory application.

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. Updating your Varnish Configuration Language (VCL) file requires restarting Varnish on your dedicated load balancers and clears the Varnish cache, which can result in reduced performance while the cache is rebuilt.