Sitecore GEO IP

79 Views Asked by At

I have an environment where a few Sitecore servers are behind a firewall & the reverse proxy in different AWS-VPCs (internet & intranet) with AWS Gateway. I need Geo-IP to be enabled and updated to the Sitecore host node for the device analytics dashboard (access via intranet or internet). Any possible suggestion? Thank you.

1

There are 1 best solutions below

0
Rian On

Reverse proxies typically forward the IP address from the connecting client via an additional http header X-Forwarded-For. See also https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For . You might need to enable this on AWS, I'm unfamiliar with their services.

However, also on the Sitecore end, you then need to enable reading of the header. This has been support for quite a while, and the documentations seems to have changed barely (if at all) since version 9.0: https://doc.sitecore.com/xp/en/developers/90/sitecore-experience-manager/set-up-sitecore-ip-geolocation.html

The interesting bits are at the bottom, though:

When requests come from a reverse proxy server to your Sitecore instance that you want to track as the valid IP addresses of a client (not as the IP addresses of a proxy), use the following setting.

  • In Sitecore.Analytics.Tracking.config change the Analytics.ForwardedRequestHttpHeader setting to the value: X-Forwarded-For