Is there a way to exclude a specific page and its children from appearing in sitemap.xml? | Community
Skip to main content
JonathanBurke
October 17, 2023
Solved

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

  • October 17, 2023
  • 2 replies
  • 2084 views

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.

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 Mahedi_Sabuj

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.

2 replies

Mahedi_Sabuj
Community Advisor
Mahedi_SabujCommunity AdvisorAccepted solution
Community Advisor
October 17, 2023

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.

Mahedi Sabuj
kautuk_sahni
Community Manager
Community Manager
October 19, 2023

@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