Forum Moderators: open

Message Too Old, No Replies

How do I create true 404's for google

Could someone please clarify this

         

Total Paranoia

9:25 pm on Mar 7, 2003 (gmt 0)

10+ Year Member



I have used htaccess to redirect any 404's to a homepage on a clients site. Is this the type of thing we shouldn't do? I take it from reading the boston thread [webmasterworld.com...] that I should just have a 404 page with a hyperlink to the home page (or whichever page I wish within the site)

btw, I still do not understand how google would determine a true 404 - does it read the title and heading? Is that what Nick_W meant on the boston thread by 404 header?

Dreamquick

9:37 pm on Mar 7, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A "true" 404 response relies on the status code the server returns when a missing resource is requested - i.e. it should be returning "404 YOUR-CHOICE-OF-HELPER-TEXT" (the text following the code is irrelevant to a crawler and is mainly to help a real person understand the coding system should they ever see it).

Using a 404 page which *blindly* returns anything other than a 404 can lead to more problems.

-Tony

Total Paranoia

9:48 pm on Mar 7, 2003 (gmt 0)

10+ Year Member



As it is not standard on my server to return a 404 I have to use htaccess to redirect any errors.

If I ensure the words error 404 ect. appear on my page and in the title will this keep GB happy?

Dreamquick

10:07 pm on Mar 7, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The on-page content is irrelevant - a crawler doesn't use this to determine if it's encountered a 404 or not.

The bit that MUST say 404 is the status code the page returns.

- Tony

Nick_W

10:09 pm on Mar 7, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



HTTP/1.0 404 Page Not Found

I'm sure the others are right in the text bit buy you need the http bit also.

Nick

JeremyL

10:47 pm on Mar 7, 2003 (gmt 0)

10+ Year Member



Firstly, if the rest of my headers are HTTP/1.1, then shouldn't all my error pages say the same?

Ok but is there anyway to get it into the header without using a scripting language like PHP? I know I can do this as follows but how about in .html or .shtml?

404.php
<?
header("HTTP 1.1/404 Not Found");
?>

Also what are all the error codes I should be concerned with and thier header info?

400 - HTTP 1.1/400 Bad request
401 - HTTP 1.1/401 Authorization Required
403 - HTTP 1.1/403 Forbidden
404 - HTTP 1.1/404 Not Found
500 - HTTP 1.1/500 Internal Server Error

Are those all right? Does the text after HTTP 1.1/400 actually matter? What are the rest that I should do listed as in the header?

Total Paranoia

11:00 pm on Mar 7, 2003 (gmt 0)

10+ Year Member



Thanks for clearing that up Nick & Tony :)

- Jim