How CDN can effect personalisation

Without going into detailed benefits of CDN, generally CDNs are used to deliver the contents from fastest and closest available server.  In Episerver Digital Experience Cloud services, CDN has its own URL pointing to the original URL. The visitor will navigate to something like "www.customer.com". The request will go to the CDN, which in turn goes to the origin URL for non-cached data. The request will return to the CDN, which will cache the content.  




Personalisation based on Geolocation will be effected as IP detection services will receive edge server’s IP. In a CDN setup, requests to the web server often come from an edge server and not from the actual client; therefore the HttpContext.Request.UserHostAddress property reflects the edge server's IP address rather than the connecting client's. This can be corrected by configuring the header with true IP. 

Add following settings in AppSettings
key="episerver:ClientIPAddressHeader" value="True-Client-IP"

*header name will be based on the header sent from the CDN(the header name differs between CDNs)

Comments

Popular posts from this blog

EPiServer CMS 11 Useful SQL Queries - 1

EPiServer CMS 11 Useful SQL Queries - 2

Strongly Type Models in EPiServer Commerce