I have installed the XML sitemap module and included all my articles in the sitemap. By default, also the URL node/add/article is added, but I do not want that since anonymous users cannot visit this page. Google's Search Console tells me that the URL is blocked by robots.txt - which is great - but I want to get rid of the warning messages that show up due to the blocking.

How can I delete the URL node/add/article from my sitemap?


This could either happen because it's node/add/article is included within a menu that's indexed by XML Sitemap or a custom path that was added.

In either case, a drush command can update the path flag for exclusion & rebuild the sitemap so that it's no longer there.

drush sqlq "UPDATE xmlsitemap SET status = 0 WHERE loc = 'node/add/article'"
drush xmlsitemap-rebuild

If you need to do this through the UI, you'll need to check either /admin/config/search/xmlsitemap/custom for a custom link or edit the menu item that contains it (/admin/structure/menu).

| improve this answer | |

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.