: Should i redirect to rename URI? 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
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
More posts by @Frith620
2 Comments
Sorted by latest first Latest Oldest Best
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.
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.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.