Submit Your Article Forum Rules

Results 1 to 3 of 3

Thread: Proper 404 status code to users and spiders?

  1. #1
    Senior Member
    Join Date
    Mar 2008
    Posts
    754

    Proper 404 status code to users and spiders?

    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?
    Do the best you can - as fast as you can - then fix it later.
    --Seth Godin

  2. #2
    Senior Member
    Join Date
    Dec 2007
    Posts
    212
    Code:
    ErrorDocument 404 /not-found.html
    returns a 404 status code.

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

    Jean-Luc
    200ok.eu Broken Link Checker finds 404 errors, error pages with 200 ok status, missing images, protocol errors, password protected pages, bad domain names, redirect loops, parking pages, ...

  3. #3
    Administrator weegillis's Avatar
    Join Date
    Oct 2003
    Posts
    5,785
    Toss in: In Firefox you can view the response headers.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •