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

Lets take this site, the path is

/questions/Question-ID/title

If a user writes the below it still works. On my site I was wondering if i should redirect the to the new url or let it be? what error code should i use? 302? 303?

/questions/Question-ID
share|improve this question
    
I think it's a better fit in webmasters.stackexchange.com –  Lipis Oct 22 '10 at 11:23
add comment

migrated from webapps.stackexchange.com Oct 22 '10 at 11:44

This question came from our site for power users of web applications.

2 Answers

up vote 2 down vote accepted

If you redirect use a 301 as you want the redirect to be permanent.

As far as should you redirect? I don't think it's necessary. Just use canonical URLs so the search engines know which URL is the primary URL. I recommend having it be the one with the keywords in it.

share|improve this answer
    
According to that link it looks like the page should have the canonical url be /questions/Question-ID and it should redirect to /questions/Question-ID/title. Is this what i should do? –  acidzombie24 Oct 22 '10 at 13:55
1  
@acidzombie24: No, you either use canonicalL or you redirect (to the canonical URL), not both. Google prefers that you use a 301 redirect. –  Lèse majesté Oct 22 '10 at 13:58
add comment

It's a good habit to provide an unique URL for every resource in your site. So the answer is yes, it's a good idea to redirect the user if it enters an incomplete URL.

In your case, the redirect should set a 301 HTTP Status code because you are permanently redirecting

/questions/Question-ID

to

/questions/Question-ID

This change will also reduce page duplication and help search engines to consolidate your ranking.

share|improve this answer
add comment

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.