Forum Moderators: open

Message Too Old, No Replies

GoogleBot + 404 + Redirect

         

code12

6:47 pm on Feb 13, 2003 (gmt 0)

10+ Year Member



Hi all,

i have a couple of pages which are no longer in service.

I dont want that they get crawled again, but it should be still user-friendly if visitors click through from google-index.

If visitors try to reach the outdated page, i am now transfering them to the "index" page.

Is there any problem doing this kind of 404 with a dynamic page and a redirect with location?

header("HTTP/1.0 404 Not Found");
header("Location: [example.com...]

Thank you!

amoore

7:06 pm on Feb 13, 2003 (gmt 0)

10+ Year Member



I would recommend that you either serve a "not found" code (404) (and possibly a some custom 404 content), or a redirect code of some kind (something that starts with a 3) and the location of the URI you would like to refer the user. Combining the two is just not the way you're supposed to be doing it.

For more information on HTTP status codes, see RFC 2616:
[w3.org...]

(PS - thanks for using "example.com" in your example. That's very responsible of you.)

amoore

7:12 pm on Feb 13, 2003 (gmt 0)

10+ Year Member



oh yeah: welcome to webmasterworld!

EasyCall

8:50 pm on Feb 13, 2003 (gmt 0)

10+ Year Member



One thing you might consider. Is there a new updated page you would rather your visitors see that might be more effective than your home page? Then use a 301 permanent redirect to the new page. I was using 404 redirecting to my index until I learned how to use 301 but it just isn't as effective. You are assuming your visitor will go looking for what he came for when in fact he may not. So if you have the updated info, send him right to it.

For a 301 redirect put this in your .htaccess file.

redirect 301 /example.html [domainname.com...]