Home » Articles » File Not Found Equals Visitors Lost

File Not Found Equals Visitors Lost

by Michael Bloch

I guess we’ve all experienced the frustration of following a link only to be presented with a '404 - File not found' browser generated error page. Have you checked your web site statistics or server logs recently to see how many instances of this is occurring on your site?

A 'File not found' browser message is a sure-fire way of sending potential customers scurrying off your site and to your competition. Here’s some tips for rectifying the problem.

Verify your links

If you’re seeing 404 errors occurring, the first thing you should do is to check all the links on your site. This can be a rather painstaking task if you have many pages, but there are software applications around to automate the process. Xenu Link Sleuth is great freeware application I’ve used many times for checking link validity.

Even if your site is rock solid, you never rename or delete files and all your links are working; the 404 error can still happen. A couple of the scenarios when this can occur:

- someone linking to you using an incorrect URL

- a malformed browser request

- a corrupt search engine listing link

Custom error pages

While some of the causes of 404 errors may be beyond your control, there are simple actions you can take to maximize your chances of keeping the client on your site, such as creating a custom error page.

This is just a page with your site design containing a friendly message stating that there’s been an error and suggesting links on your site that the visitor may be interested in.

Then, in your .htaccess file, add the following line:

ErrorDocument 404 http://site.com/404.htm

.. where site.com is your site and 404.htm the name of the custom error page file

After implementation, the next time a page from your site is requested that doesn’t exist, the person will be redirected to the custom error page.

Exclude search engine robots

Note: if you already have a custom error page in place, I also recommend including a robots exclusion statement for the page. It’s a page that you don’t want search engines to index as it has been reported to cause ranking issues.

A robots exclusion statement can be placed in your robots.txt file, or in the page itself between the source code head tags like so:


<meta name="robots" content="noindex,nofollow">


If you do find a need to rename or move files around, rather than rely on a custom error page it’s wise to use a 301 redirect - this is also implemented in your .htaccess file. This can also help preserve your search engine rankings for that page. The 301 redirect will seamlessly redirect any request for the old page to the new/moved/renamed page.

Monday, Feb 12th, 2007