Aem OOTB sitemap generator for dynamic pages | Community
Skip to main content
Level 2
May 17, 2024

Aem OOTB sitemap generator for dynamic pages

  • May 17, 2024
  • 5 replies
  • 5410 views

we have product pages rendering dynamically from external , without the physical page actually present in aem ex:/content/wknd/us/en/products is the existing page but our product pages will be generated with suffix without actually having the pages in aem.  is there a way to extend the ootb sitemap functionality to include these dynamic urls using custom code

 

@imran__khan @arunpatidar 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

5 replies

TarunKumar
Community Advisor
Community Advisor
May 17, 2024

Hi @pradeep_varmape ,

If you want to include external URL in your sitemap then one approach I'd suggest is that mention all these URLs in a file.
Then upload this file in DAM.
Now in your custom code you can read this file asset and show the external URLs in sitemap.


Thanks
Tarun

Level 2
May 17, 2024

hi @tarunkumar 

how do i extend the OOTB sitemap functionality to read the references from the upload asset, so that my OOTB functionality still works butthe dynamic urls are added to the sitemap

HrishikeshKagne
Community Advisor
Community Advisor
May 17, 2024

Hi @pradeep_varmape ,

Yes, you can extend the Out-of-the-Box (OOTB) sitemap functionality in Adobe Experience Manager (AEM) to include dynamic URLs generated from external sources. Here's a general approach you can take:

  1. Custom Sitemap Generation Component: Develop a custom component or service to generate the sitemap. This component will need to fetch the dynamic URLs from your external source and include them in the sitemap XML.

  2. Integration with External Source: Implement a mechanism to fetch the dynamic URLs from your external source. This could involve using HTTP requests, APIs, or any other suitable method to retrieve the URLs.

  3. XML Generation: Once you have the dynamic URLs, you need to format them into XML according to the sitemap protocol. You can use Java libraries like JAXB or Apache Sling Models to help with XML generation.

  4. Sitemap Configuration: Configure AEM to use your custom sitemap generation component instead of the OOTB one. This typically involves configuring a servlet or a job to trigger the generation of the sitemap XML.

  5. Scheduled Generation: Schedule the sitemap generation job to run periodically to keep the sitemap up-to-date with any changes in the dynamic URLs.

By following these steps, you can extend the OOTB sitemap functionality in AEM to include dynamic URLs from external sources. Keep in mind that you'll need appropriate permissions to develop and deploy custom code in your AEM instance.

Hrishikesh Kagane
November 14, 2024

thanks but looks like chatgpt response. 

gkalyan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
May 17, 2024

@pradeep_varmape 

There is no out-of-the-box (OOTB) functionality in AEM to generate a sitemap for dynamic pages that are not physically present in the repository. However, you can extend the existing sitemap functionality by implementing a custom sitemap generator.

 

Level 9
May 19, 2024

Agreed OOTB I don’t see an option but extending might help. However have these urls embedded within robots would help along with existing? 

kautuk_sahni
Community Manager
Community Manager
May 20, 2024

@pradeep_varmape Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

Kautuk Sahni
September 13, 2024

For a project, we used the default sitemap which generated URLs for dynamic PDP (Product Detail Pages)