26 Mar 2006

The most common problem with custom 404 pages

I’ve had custom error pages for ages and never realised until today that custom error pages need to be set up correctly in order to work according to web standards, and to keep search engines crawling your site happily.

Basically my custom-created 404 File Not Found page (and all the others) returned a status of 200 (OK) in the header. A status of 200 means that the server was able to return content for the URL you requested. Usually a normal web page returns 200, saying all is ok – as is the case with my custom 404 page. I didnt realise I also need to return the correct status of 404 in the header of that page by using PHP.

GSiteCrawler explain the whole thing in detail with instructions on how to adapt your custom pages — whether they be in PHP, ASP or ASP.NET — to return the correct status in the header.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.