Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events
SOLVED

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

Avatar

Community Advisor

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?

1 Accepted Solution

Avatar

Correct answer by
Level 6

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-aemaa...

 

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.

View solution in original post

4 Replies

Avatar

Employee

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

 

Avatar

Correct answer by
Level 6

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-aemaa...

 

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.