I'm coding the sitemap logic of my side-project blogging platform and I would like to know if omitting the slug in the <loc> nodes of the sitemap. Could be a problem for the crawlers.

Having two URLs that point to the same page:


Could I use just links without the slug to create the sitemap? Does it have any drawbacks?

  • 1
    What Itai said, but also: it kind of sounds like you intend to list both URLs regardless of one (probably) being preferable. Is that correct, and if so why? I'd argue the sitemap should only list the actual–single–desired permalinks for things.
    – Su'
    Jul 20, 2011 at 22:44
  • what do you mean with actual-single-desired? To the best of my knowledge, sitemap can list every url of the site, if you want to differentiate the weight of a link, you could use the priority tag. Jul 21, 2011 at 6:36
  • 1
    What I mean is that it sounds like you plan to have every possible URL in there, including alternates, eg. your example. In actual practice, however, you're probably only going to expose one of those, and should therefore only tell the engines about that one in your sitemap. Rel-canonical will help make sure they reconcile things to the canonical one if they happen to hit the others, but the fact you're using it suggests you shouldn't go out of your way to tell them about the alternates in the first place. Does that make sense?
    – Su'
    Jul 21, 2011 at 9:18
  • @Su' Thanks for the clarification. I'd like to add just one kind of url, the one without slug and I'm asking if, using this kind of link, hides any drawbacks. Jul 21, 2011 at 9:52

1 Answer 1


No but I would use the canonical links as much as possible. That way they get copied and passed along right.

So if the canonical has the slug, I suggest you use that one. Actually, I high recommend canonical to use the slug, it will be more search-engine friendly.

  • 2
    Do you have any documentation that support this approach? Jul 21, 2011 at 6:34
  • @systempuntoout Added a link to Google's info on rel-canonical. Note that for purposes of the sitemap, you are not going to use rel="canonical." The important bit here is just the "what is/why use" section. This ties into my comment above about simply not listing the alternative URLs in the sitemap at all.
    – Su'
    Jul 21, 2011 at 9:24
  • @Su' I don't want to add them both, I'm going to add just one kind of url and from what my code looks like, I'd prefer to use the one without slug. So I'm asking if it implies something in term of crawlers, seo and stuff like that. My question was not clear, sorry for that :). Jul 21, 2011 at 9:55
  • 1
    +1, use the full URL in both rel="canonical" and in the sitemap.
    – UpTheCreek
    Jul 21, 2011 at 10:37
  • Coded and deployed as you suggested, I hope it is worth it :). Jul 21, 2011 at 20:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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