views:

308

answers:

3

Say that I have an article with multiple pages. Each page has a short title for in the URL (wordpress calls them post slugs). If this title is not given in the URL, the first page is shown, so example.com/myarticle is the same page as example.com/myarticle/firstpage.

The question is: Should I redirect the former to the latter? And if so, which code? 301, 303?

Keep in mind that the title of the first page may be changed (or they may even be a new first page) after the article was published. example.com/myarticle might point to example.com/myarticle/introduction now, but in the future it could be example.com/myarticle/tableofcontents, if the author decides to shuffle around his article.

+1  A: 

You can redirect; if you're doing this for SEO, use 301, so people who copy the URL from their address bar will be copying your preferred form of the URL.

Another option, that should work with Google at least, is to use <link rel="canonical">.

Brian Campbell
But what does the address bar have to with it? The content of that one will be correct no matter the status code I give the redirect ;)
Bart van Heukelom
If you do a permanent redirect, the address bar will change to have your preferred URL in it. Then when they copy and paste that into their own blog post or other web page, it will be the preferred URL that they will put in there, which means that you will have more links to your preferred URL, rather than potentially having links to two different URLs on different websites. I haven't specified what your preferred URL should be; whether it should be the short one or the long one, just that you should pick one and do a 301 redirect to it.
Brian Campbell
I know, but the same happens with a temporary or any of the other redirects.Unless you're thinking about redirecting with meta refresh or frames or something: big no! :p
Bart van Heukelom
Sorry. I was thinking of CNAMEs or Apache rewrite rules that aren't set to redirect.
Brian Campbell
Ah yes, I actually forgot to mention explicitly I'm going to HTTP redirect (with a Location header) so it's not entirely your fault.
Bart van Heukelom
A: 

You should use a 301 (permanent) redirect. If you don't use a redirect you're risking a duplicate content penalty.

Greg
But, actually, it isn't permanent. example.com/myarticle might point to example.com/myarticle/introduction now, but in the future it could well be example.com/myarticle/tableofcontents, if the author decides to shuffle around his article.I should add by the way that duplicate content is not penalized. This is a myth. The only difference is that only one of the duplicates will be indexed.
Bart van Heukelom
A: 

Taking into account that it won't really matter for SEO, I'm just not going to redirect. I will add canonical links where appropriate though (thanks for the suggestion)

Bart van Heukelom