views:

78

answers:

3

If you have an URL like this:

http://stackoverflow.com/questions/123/this-is-my-question

If someone creates a link on his website, but changes the name like this

http://stackoverflow.com/questions/123/this-is-a-different-question-title

that would cause duplicate content. Is it nessecary to check if the name in the url is the same as the real name of the question and if not do a 301 redirect to the correct URL?

I see Stackoverflow.com doesn't do a 301 redirect, but just accepts any name in the URL. Can this cause duplicate content or your ranking to drop? Is SO not affected by this?

+3  A: 

This won't cause duplicate content as long as you use a <link rel="canonical"> element. For example, this question's <link rel="canonical"> element is:

<link rel="canonical" href="http://stackoverflow.com/questions/3488655/seo-duplicate-content"&gt;

This element does not change even if you visit the page with a different slug at the end of the URL.

It tells Google that, even if it got to this page via a different URL, it's the same page as the canonical page (not a duplicate) and it should be counted as such.

More info: Official Google Webmaster Central Blog — Specify Your Canonical

Mark Trapp
what if you don't use this attribute? i think one question in this question is how differently are outside / inside links treated by google..
darma
@darma: if you don't use the tag or a 301, Google treats it as duplicate content. I got the impression he was asking how StackOverflow avoided using a 301 redirect, not how to avoid using `rel="canonical"`.
Mark Trapp
+1  A: 

I think this can be resolved with canonical meta tag.

silvo
A: 

Duplicate content does not "cause your ranking to drop", this is a myth. In the example you gave, the worst thing that'll happen is that the first URL wouldn't gain any page rank benefit from the (incorrect) link, since it is to a different URL. You want to try and avoid this sort of thing simply because if lots of people are linking to the same content at different addresses, the benefit you get from those links is split. There is no 'penalty'.

In my opinion the correct thing to do here is to check the name in the URL against the name in the database, and if it doesn't match, send a 404 (the link is wrong after all). This way people are unlikely to link to the wrong URL in the first place.

If this is an old site and you already have lots of inbound links to incorrect URLs, you might want to send 301s to the correct URLs instead so as not to dead end users.

Some further reading:

Tim Fountain
Thanks, helpful article!
johan