CDN Configuration for Geo-based Routing & Consent | Community
Skip to main content
Level 2
April 1, 2025
Solved

CDN Configuration for Geo-based Routing & Consent

  • April 1, 2025
  • 2 replies
  • 701 views

Hey Everyone,

 

We’re exploring region-based routing support for our EDS site (e.g. / → /en/uk/ for UK visitors) and wanted to get your advice on best practices for implementation — especially as this may require user consent under GDPR. 

 

Here’s our current understanding and open questions:

  • We understand automatic redirects based on geolocation require explicit user consent. We plan to use a CMP like OneTrust to collect that consent — but are unsure if the redirect logic should be implemented purely client-side after consent, or in the CDN layer.
  • If handled in the CDN, can Adobe help configure this once the domain and SSL are set up? Are there templates or examples for setting up conditional geo-redirects in AEM EDS Cloud?
  • If handled client-side, do we need to build a custom modal or component to prompt users for their preferred region/language? Or would OneTrust handle the interface and just pass back location data for us to act on?
  • What fallback should we plan for in the event a user declines location consent (i.e., redirect to a “default” region like /en/us/)?

Any guidance or working examples for how other EDS projects have handled this would be super helpful.

 

Thanks in advance for your help!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by arunpatidar

Hi @saadab 

I think you can do it at CDN, you don't need client consent to redirect to country site

https://medium.com/@bsaravanaprakash/geolocation-using-aem-cloud-service-works-great-except-it-doesnt-8045cd2108c8 

2 replies

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
April 1, 2025

Hi @saadab 

I think you can do it at CDN, you don't need client consent to redirect to country site

https://medium.com/@bsaravanaprakash/geolocation-using-aem-cloud-service-works-great-except-it-doesnt-8045cd2108c8 

Arun Patidar
muskaanchandwani
Adobe Employee
Adobe Employee
April 4, 2025

The audiences in the EDS experimentation engine maybe helpful for page personalization if you’re using an external service to provide geolocation info

https://github.com/adobe/aem-experimentation/blob/main/documentation/audiences.md

For redirects, a simple client-side JavaScript approach could work well. It would just call your geo-IP service and apply redirect logic based on the user’s location (ideally after getting consent if required under GDPR).

You could also look into using Fastly’s geofencing or geo-blocking features for redirecting at the CDN level:

https://www.fastly.com/documentation/solutions/tutorials/geofence/
https://www.fastly.com/documentation/solutions/examples/geofencing-geoblocking-content-by-region/