I'm making a sitemap using the XML Sitemap module. The module and its submodules allow nodes to be added to the sitemap from the content type configuration screen as well as the menu configuration screen.

So, for example, I can add all nodes of type Basic page to the sitemap, and then I can add all links in the Primary links menu (many of which are nodes of type Basic page) to the sitemap as well.

My question: Is doing this OK? Should I be worried about having duplication between adding the content types and adding the menus? Or is this nothing to worry about?

  • If this is about the SEO implications of showing it twice, then this would be off-topic for this site. If not, then can you clarify what you are concerned for? – Nigel Waters Aug 3 '13 at 5:45
  • @NigelWaters I'm specifically interested in how the XML Sitemap module generates the sitemap, and the implications that the design decisions of that module have for SEO. – Patrick Kenny Aug 3 '13 at 15:57

There is no harm in adding both by menu and by content type (I have tested this before). In my experience, paths will not be duplicated.

If you also add by content type, then that priority will be used, even if it is lower than the one you have set for the menu. Also, the last modification date will be used; it doesn't get used when you add by menu. The XML Sitemap module also checks node access rights, so only ones visible by anonymous will end up in the sitemap.

If you add by menu, the module will not output links that the anonymous user doesn't have access to.

I don't recall explicitly testing paths that exist in multiple menus, though.

  • Thanks, it's really helpful to know which priority is dominant. – Patrick Kenny Aug 3 '13 at 15:57

There are 2 aspects:

  1. SEO - if one node is always seen under one address, or you properly set canonical, it's no problem.

  2. HTML structure - you need to make sure there are no duplicated IDs on links when you output them twice, as it can sometimes mess Drupal's (and contrib) javascript operating on links. And of course it prevents your site from validating with w3c tools.

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.