Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Depending on the type of page visited (for example, “static” content vs. product page), we have a requirement to show different error messaging when the page requested is not found. Given that we are on a two tier architecture and have no dynamic language ability on the web servers, we are using HTTP status codes in the 400 range to display this messaging using the ErrorDocument setting in Apache configuration.

These status codes, of course, show up in Google Webmaster tools as HTTP errors rather than not found errors and there is concern that these 400 range errors will not cause search engines to remove these pages from their indexes.

Is there anyone else who has had this type of requirement with the limitation of no dynamic languages on the web server - and if so - have you solved this problem differently?

Thanks

share|improve this question
1  
This should probably be 2 questions so people can answer each one separately. –  RandomBen Oct 19 '10 at 16:20
    
Thanks for the feedback. Splitting this up into two questions. –  rbieber Oct 19 '10 at 16:25
    
What are the actual status codes you are using? –  DisgruntledGoat Oct 19 '10 at 16:26
    
418 and 419, specifically, which according to the spec are 'unused'. –  rbieber Oct 19 '10 at 16:30
2  
@rbieber: actually 418 is the code to let the client know the server is a teapot (an April Fool's joke). See en.wikipedia.org/wiki/HTTP_status#4xx_Client_Error –  DisgruntledGoat Oct 19 '10 at 16:46
show 1 more comment

1 Answer

The "Not Found" error is HTTP Status Code 404. Any other status code is a different error. Don't worry, Google is perfectly capable of detecting and handling other status codes. It won't index your page if it returns a 4xx error, so if you can't return a different page for the same status code, then different status codes will be fine.

Try and make them sensible - "404 Not Found" and "410 Gone" are perfectly valid for missing pages, but "405 Method Not Allowed" doesn't make sense for that situation. See Wikipedia for a clear list of ones you should use.

Webmaster Tools, however, is a separate application to Googlebot and generally only reports what it thinks is "useful" information. So in this case it isolates 404 Not Found errors because that is the most common code when a page cannot be returned. I remember seeing a 500 error tab at one point too.

Finally, one possible solution: use Javascript to display different content based on the URL that is not found - for example if your static pages always end with .html and your dynamic ones .aspx or have no extension. (If you need help with that, it would be best to ask on Stack Overflow, which is tailored towards programming.)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.