PDA

View Full Version : Proper 404 status code to users and spiders?



keyon
01-15-2012, 01:01 PM
I have a custom 404 page on my site, and I'm using the following code in my htaccess to direct visitors there:

ErrorDocument 404 /not-found.html

However, I was reading an article about 404 pages in Google Webmaster help, and came across a sentence that I guess I'm not understanding entirely. After explaining the benefits of creating a "custom 404" page, Google goes on to say:

"You should still make sure that your webserver returns a 404 status code to users and spiders, so that search engines don't accidentally index your custom 404 page."

How do I know if my web server is returning the proper 404 "status code"? (in addition to sending visitors to my custom 404 page) My custom page doesn't seem to be indexed by search engines, but is there something else I should be checking?

Jean-Luc
01-15-2012, 03:24 PM
ErrorDocument 404 /not-found.htmlreturns a 404 status code. :-D


ErrorDocument 404 http://www.my_site.com/not-found.htmlreturns a 302 redirect code followed by a 200 status code. :evil:

Jean-Luc

weegillis
01-15-2012, 03:54 PM
Toss in: In Firefox you can view the response headers.