Expand my Community achievements bar.

SOLVED

Is there a way to exclude a specific page and its children from appearing in sitemap.xml?

Avatar

Level 1

I'm currently using Apache Sling Sitemap Module to generate the the sitemap.xml on my website. I was wondering if there is a way to exclude a specific parent page and its children from appearing in sitemap.xml? My website is fairly large and I would like to avoid having to manually add noindex to each individual child page. It would be great to be able to exclude child pages via code, or edit a configuration on the parent page... If anyone has any insight on this issue, it would be great to hear your solution.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

To exclude a specific parent page and its children from appearing in sitemap.xml, you need to configure Exclude Paths using the Apache Sling Sitemap - Scheduler

You need to Include the parent page path (excluding .html) within the Excluded Paths configuration in the Scheduler Config. Additionally, Enable the "Generate Sitemap" option in the Page Properties, as it works only when the path itself is a Sitemap Root. This action will remove child pages as well.

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

To exclude a specific parent page and its children from appearing in sitemap.xml, you need to configure Exclude Paths using the Apache Sling Sitemap - Scheduler

You need to Include the parent page path (excluding .html) within the Excluded Paths configuration in the Scheduler Config. Additionally, Enable the "Generate Sitemap" option in the Page Properties, as it works only when the path itself is a Sitemap Root. This action will remove child pages as well.

Avatar

Administrator

@JonathanBurke Did you find the suggestions from @Mahedi_Sabuj 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