AEM OOTB Sitemap (On Demand) not resolve /etc/map | Community
Skip to main content
Mahedi_Sabuj
Community Advisor
Community Advisor
July 24, 2023
Solved

AEM OOTB Sitemap (On Demand) not resolve /etc/map

  • July 24, 2023
  • 2 replies
  • 1339 views

Hi Community Members,

I am using AEM v6.5.16 and Core Component v2.21.2. I enabled OOTB "Generate Sitemap" option from Page Properties, sitemap.xml is generated as expected on Author.

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>http://localhost:4502/content/aem-demo/de/de.html</loc> <lastmod>2023-02-02</lastmod> </url> <url> <loc>http://localhost:4502/content/aem-demo/de/de/getting-support.html</loc> <lastmod>2022-11-09</lastmod> </url> </urlset>

 But In dispatcher, at sitemap.xml; content path is not resolved with /etc/map instead of I am getting Publish URL defined at CQ Link Externalizer. Expected result below:

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url> <loc>https://aem-demo.com/de/de.html</loc> <lastmod>2023-02-02</lastmod> </url> <url> <loc>https://aem-demo.com/de/de/getting-support.html</loc> <lastmod>2022-11-09</lastmod> </url> </urlset>

 Any suggestion how I can achieve the expected result?

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 kaikubad

Hi,

I guess you have followed the steps documented here
https://aemsimplifiedbynikhil.wordpress.com/2021/12/01/apache-sling-sitemap-for-aem-6-5-11-and-aemaacs/

 

In case you need to override the default/some part of default implementation please checkout this documentation

https://www.tothenew.com/blog/exploring-apache-sling-sitemap-generator-with-customization-in-aem/

 

In our project we have map + dispatcher config for sitemap.

2 replies

Nishant-Singh
Adobe Employee
Adobe Employee
July 24, 2023

It seems your rules defined under /etc/map is not taking effect.

you can verify by using JCR ResourceResolver option of the Felix console; for example, https://<*host*>:<*port*>/system/console/jcrresolver

 

Mahedi_Sabuj
Community Advisor
Community Advisor
July 24, 2023

Hi @nishant-singh, Map is working fine when browsing Content Pages.

Mahedi Sabuj
kaikubad
Community Advisor
kaikubadCommunity AdvisorAccepted solution
Community Advisor
July 24, 2023

Hi,

I guess you have followed the steps documented here
https://aemsimplifiedbynikhil.wordpress.com/2021/12/01/apache-sling-sitemap-for-aem-6-5-11-and-aemaacs/

 

In case you need to override the default/some part of default implementation please checkout this documentation

https://www.tothenew.com/blog/exploring-apache-sling-sitemap-generator-with-customization-in-aem/

 

In our project we have map + dispatcher config for sitemap.

Mahedi_Sabuj
Community Advisor
Community Advisor
July 24, 2023

Thanks @kaikubad. Looks like, need to override addResource implementation. Got more details from Building an XML sitemap on AEM and Extending the Apache Sling Sitemap Generator.

Mahedi Sabuj