SiteMap for different locale / domain

Avatar

Avatar

anuj_pathak1

Avatar

anuj_pathak1

anuj_pathak1

23-05-2018

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.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

justin_at_adobe

Employee

Avatar

justin_at_adobe

Employee

justin_at_adobe
Employee

24-05-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.

Answers (5)

Answers (5)

Avatar

Avatar

justin_at_adobe

Employee

Avatar

justin_at_adobe

Employee

justin_at_adobe
Employee

24-05-2018

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

Avatar

Avatar

edubey

Avatar

edubey

edubey

24-05-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.

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K
smacdonald2008

24-05-2018

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

Avatar

Avatar

anuj_pathak1

Avatar

anuj_pathak1

anuj_pathak1

24-05-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. 

Avatar

Avatar

PuzanovsP

MVP

Avatar

PuzanovsP

MVP

PuzanovsP
MVP

24-05-2018

Hi Anuj,

It's an open source project, raise Issue on Github GitHub - Adobe-Marketing-Cloud/aem-core-wcm-components: Adobe Experience Manager (AEM) Sites Core Co...

Regards,

Peter