Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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:

http://www.foo.com/post/213212/

http://www.foo.com/post/213212/this-talks-about-foo

could I use just links without the slug to create the sitemap?
Does it hide any drawbacks?

share|improve this question
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 '11 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. –  systempuntoout Jul 21 '11 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 '11 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. –  systempuntoout Jul 21 '11 at 9:52

1 Answer 1

up vote 7 down vote accepted

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.

share|improve this answer
1  
Do you have any documentation that support this approach? –  systempuntoout Jul 21 '11 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 '11 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 :). –  systempuntoout Jul 21 '11 at 9:55
1  
+1, use the full URL in both rel="canonical" and in the sitemap. –  UpTheCreek Jul 21 '11 at 10:37
    
Coded and deployed as you suggested, I hope it is worth it :). –  systempuntoout Jul 21 '11 at 20:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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