Forum Moderators: phranque

Message Too Old, No Replies

server returns 302 instead of 404, help :(

HTTP status code error with my hosting

         

followgreg

9:28 am on Apr 13, 2005 (gmt 0)

10+ Year Member



Hi,

I did some tests on the HTTP status with my server and when a page is not found it returns a 302 first then it redirects to the 404, instead of doing directly a 404!

I know it is a problem with search engines and the hosting company (claims they are N1...) seems just not to understand what i am talking about and just won't fix it for a week!

How should I do? is there anyway to safely mod_rewrite this?

Thanks :(

jd01

9:56 am on Apr 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Are you using custom error pages?

followgreg

10:41 am on Apr 13, 2005 (gmt 0)

10+ Year Member




Yes I do but at the end it doeesn't change bbecause im afraid that the search engines are taking it like a trick, Yahoo already dropped me big time since I have these errors and Google is not indexing enymore new pages.

Robots are getting 302 all the time ..it sucks :(

jdMorgan

1:56 pm on Apr 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The most common error we find when looking at custom error document problems is one that is discussed in the documentation for the Apache ErrorDocument directive. That is, a proper ErrorDocument declaration gives a local URL-path, not a canonical URL. If a canonical URL is given, then the server must generate a redirect in order for the client to reach the document.

As an example, use:


ErrorDocument 404 /path_to_error_page.html

and not

ErrorDocument 404 http://www.example.com/path_to_error_page.html

The former will generate a proper 404 response, while the latter will generate a 302-Moved Temporarily response, as described in the Apache ErrorDocument documentation [httpd.apache.org].

Jim

followgreg

8:25 pm on Apr 13, 2005 (gmt 0)

10+ Year Member




Hey,

I finally could do the change myself on the server, the documentation was very helpful, thanks a lot :)