SiteMap for different locale / domain | Community
Skip to main content
Level 3
May 23, 2018
Solved

SiteMap for different locale / domain

  • May 23, 2018
  • 6 replies
  • 4960 views

We are using ACS Common to provide sitemap for SEO but running into issue where for non English sites(.com site), it is returning URL with English site links

Ideally...

Request for mysite.com/sitemap.xml would rewrite to mysite.com/mysite.com/content/my_company/en_us.sitemap.xml 

Request for mysite.es/sitemap.xml would rewrite to mysite.es/content/my_company/es_es.sitemap.xml

But currently for es locale site (mysite.es), it is returning url starting with mysite.com/xxx instead of mysite.es/xxx

is it because we can configure only one domain in Externalize? any way to overcome this issue?

Appreciate any 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 JustinEd3

This is indeed a limitation -- if both /content/my_company/en_us and /content/my_company/es_es have the same resource type, then they will share the same sitemap servlet instance and thus the same externalizer name.

There was some interest about two years ago to make this more flexible, but the issue didn't get worked on and became stale. See https://github.com/Adobe-Consulting-Services/acs-aem-commons/issues/652

There may also be an opportunity to use the wcm.io URL Handler (http://wcm.io/handler/url/), although that would be a bit more complicated since the dependency from ACS AEM Commons to wcm.io would have to be optional.

You could also just use different resource types, although this may have other downstream implications.

6 replies

Peter_Puzanovs
Community Advisor
Community Advisor
May 24, 2018
Level 3
May 24, 2018

well, its not an issue or may be limitation of current implementation and I wanted to check if someone overcome this challenge in some way. 

smacdonald2008
Level 10
May 24, 2018

We are checking with the team whom wrote ACS-Commons.

JustinEd3Adobe EmployeeAccepted solution
Adobe Employee
May 24, 2018

This is indeed a limitation -- if both /content/my_company/en_us and /content/my_company/es_es have the same resource type, then they will share the same sitemap servlet instance and thus the same externalizer name.

There was some interest about two years ago to make this more flexible, but the issue didn't get worked on and became stale. See https://github.com/Adobe-Consulting-Services/acs-aem-commons/issues/652

There may also be an opportunity to use the wcm.io URL Handler (http://wcm.io/handler/url/), although that would be a bit more complicated since the dependency from ACS AEM Commons to wcm.io would have to be optional.

You could also just use different resource types, although this may have other downstream implications.

Adobe Employee
May 24, 2018

And yes, to Peter's point, the best place to discuss this is in GitHub Issues, not the AEM forums.

edubey
Level 10
May 24, 2018

it reminds of previous project. We had one sitemap component which shows links in html page (sitemap.html) as well as generate XML (sitemap.xml.html)

Each locale had their own sitemap component in its sitemap.html page

and mapping from JCR Resource resolver was used to map these internally.

site.com/sitemap.xml - content/site/jcr:content/sitemap.xml

site.en/sitemap.xml - content/site/en/jcr:content/sitemap.xml

site.us/sitemap.xml - content/site/us/jcr:content/sitemap.xml

hope this helps.

Main idea was to use same sitemap component across different locale but controlled by resolver mapping for execution.