Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Should I be using a 301 redirect or serve error code 404?

         

jpservicez1

9:24 am on Sep 11, 2008 (gmt 0)

10+ Year Member



Hi guys

Need help here.

Two urls

www.example.com/authorid -- [wrong]
www.example.com/authorid/0 -- [correct]

How do i deal with this url "www.example.com/authorid"? Do I "301" it to the correct URL or do I serve error code "404"?

The reason i ask is which method will prompt quick update of the search engine index.

Receptional Andy

9:54 am on Sep 11, 2008 (gmt 0)



If you believe the requests are intended to reach /authorid/0 (and always this URL) but have been mis-typed or otherwise accidentally malformed, I would send a redirect. If you are not sure about where the request was intended to reach, a helpful 404 would likely be best.

jpservicez1

10:02 am on Sep 11, 2008 (gmt 0)

10+ Year Member



The issue was i didn't know till last month that the two urls were serving the same page. The incorrect & correct urls were both on my site and Google index both. Now i want to get rid of the incorrect one "www.example.com/authorid" and only serve the correct url.

Hence my original question. I have for now disable the incorrect url by returning error code 404 but just want to be sure thats the best approach.

Receptional Andy

10:44 am on Sep 11, 2008 (gmt 0)



It isn't a case of "getting rid" of one, but avoiding the potential for duplicates while maintaining usability. In this instance I'd say a permanent redirect is the best choice.

jpservicez1

10:50 am on Sep 11, 2008 (gmt 0)

10+ Year Member



thanks Andy

g1smd

12:40 pm on Sep 11, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I would always go with the shorter of the two URLs.

That's because when a bot discovers a URL that looks like it is folder based, it can often chop elements off the end and try again looking for new content at the shorter URL.