0

I want to exclude some pages from the sitemap.

I go to these pages/nodes, edit them, then go to the XML sitemap tab and set it to 'Exclude'.

I then save and clear cache.

But when I look at my sitemap.xml file nothing is changed - the page URLs are still present.

How do I remove them?

1

The XML Sitemap module doesn't rebuild sitemaps on every node save/load; also, it's not cached like other artifacts in Drupal.

The module tracks XML Sitemap links and they are added/removed upon cron runs. So you'll need to run cron to rebuild your sitemap files.

You can also follow some of the steps in the Setting up your site map (7.x) documentation:

  1. Under "Inclusion" change "Excluded" to become "Included"
  2. To add pages linked from menus to the sitemap, visit the edit page for each menu whose items should be included (this would usually include the Main menu). Open the XML sitemap fieldset, and similarly change "Excluded" to "Included". Hit Save.
  3. Once that is all complete, go to Configurations --> Search and Metadata --> XML Sitemap
  4. Click on the Rebuild Links tab in the upper right
  5. Click on "Rebuild sitemap" even if the message says that you do not need to.
  6. Now you're taken back to the config page which shows you the link to your xmlsitemap which you can click and confirm that pages have been added

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.