Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

etc map for multi domain in aem 6.5


Level 2


I have 2 domains for my dev environment for which I have created etc/map to shorten the content url.

etc map redirect for both domain is similar like this-








both domain has same sling:internalRedirect and redirect node.

but when I am generating sitemap.xml on domain (using acs common) all my generated pages having domain and not

why is only one domain's etc/map is getting picked up for url shortening ?


1 Reply


Community Advisor

Hi @Anoop345 


This is not feasible.

The etc/map settings does not match the origin header of the incoming request, and will stop on the first match it finds for the underlying content path. This is not much of a problem for incoming requests but becomes an issue for outgoing re-written links. e.g., if you have two settings for outgoing mapping i.e map1 for and map2 both resolving to the content path /content/project/content then regardless of which domain the request comes from, the outgoing short URL will be of the first setting Sling will match for that content path, in this case map1 (whichever is first match. It can be anyone).


Please try redirect/mapping using dispatcher or webserver redirect it will help you achieve the use case.