Forum Moderators: phranque
i recently set up a custom error page whereby any requests for a non-existent page go to www.domain.com/404/404.html which is effectively a site map (which i exclude spiders from using robots.txt)
i have recently restructured my site and am waiting and waiting and waiting for googlebot to gobble up my new dynamic pages. well all that googlebot seems to be doing is to make new requests for the old urls but i'm not seeing a large number of 404s in my access log.
i thought i'd use the server headers tool here at WebmasterWorld to make sure everything is ok and to my horror my site seems to be returning a 302 instead of a 404 for non-existent pages.
my httpd.conf file contains:
ErrorDocument 404 [domain.com...]
have i set this up ok or am i confusing the bots?
thanks in advance for your help.
The Apache documentation [httpd.apache.org] for Errodocument specifically warns about this problem.
To return a proper server code for 403, 404, 410, etc., you must not use a full URL-path (which includes a method) as the destination. Instead, use only a local path.
ErrorDocument 404 /404/404.html