. .... Internet marketing resources, ecommerce web site design tutorials and  just for fun - free cell phone ringtones!
  Taming the Beast - quality web marketing and ecommerce development services .... Email marketing software .

.

Free Internet marketing resources, web site development tutorials, ecommerce strategies & software solutions.
 Shopping cart reviews & affiliate marketing guides & articles, plus search engine marketing resources & tools. 
Taming the Beast - providers of ecommerce & web marketing services to Adelaide, South Australia & the world!

 

Return to web marketing and ecommerce articles index


Custom error pages - beating 404 errors and keeping visitors

Create custom error pages, help keep your visitors and increase your sales!

HTTP 404 - File not found is a browser error message that we've all grown to know and hate after clicking on a link. 

On reviewing my server logs many moons ago, I  noticed around 1% of all requests from my site will return this HTTP error code. One of the reasons for it was a stupid mistake. I wasn't happy with the naming of a couple of my files, so I renamed them without considering the consequences:

- The files had been on my site for short time

- During that time a couple of search engine spiders had crawled through the pages. A search engine spider  is a software program that scours web sites for content and returns the results to a search engine database. The search engine interface feeds off this to return listings to searchers when they have entered their search criteria.

Need to learn about  search engine ranking and optimization strategies, without having to spend months in research? More than just a book; this is one of the most comprehensive training programs published including the book, added tools, videos and a members only forum -  SEO BOOK

- Since I changed the names of the files after the spider went through and had not used a 301 redirect, the pages in their original state no longer "existed".

- The search engine query results reflect the database entries, pointing to the wrong filename, visitor clicks on the result - 404.... aaaaaaaaargh!

404 errors may also be caused through a malformed browser request (user error - wrong URL typed into address bar)

You can help prevent 404 errors scaring visitors away quite easily - dependent upon your hosting service set up. Instead of a visitor being directed to those rather horrible "file not found" pages, you can create custom error pages. Here is an example:

http://www.tamingthebeast.net/aaaargh

The above link is incomplete which triggers a 404 response on my server.

By implementing custom error pages, you have a good chance of retaining the visitor, especially if you include the standard navigation buttons. It also acts as a means of apologizing to the visitor for the inconvenience. More retained visitors can equal more sales.

It isn't just 404 error messages that you can apply this to. There are a number of error code returns that you could customize, all with the goal of alleviating visitor stress and encouraging them to further explore your site. View a listing of http error codes.

Creating custom error pages:

You may want to check with your hosting service first before creating custom error pages as certain hosting configurations may not allow you to create custom error pages. For this exercise, your host needs to support .htaccess files.

1. Create your custom error page

First design and publish the error pages to your server.  You'll only really need to design a couple for the more common errors, for file not found (404) or unauthorized/forbidden (403, 401). Your custom error pages should have a brief summary of what went wrong and an encouragement for the visitor to try again or explore a different area of the site. The best custom error pages are those that match the site's other pages in navigation and layout.

Note: I also suggest adding the following line between the <head> and </head> tags:

<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">

You don't want search engines spidering the page - it has been known to cause problems.

2. Open/create your .htaccess file

After publishing the pages, you'll need to edit the .htaccess file in the root directory of your server based web. Use the Edit utility (set to ASCII transfer mode) in your FTP program  to view the file or a text editor such as Notepad.

The .htaccess file contains a number of settings to control who can access the contents of a specific directory and how much access they have.  It can also be used to create a "URL Redirect".

If you have a FrontPage based web, be especially careful, as the .htaccess file contains other settings as well.

If you don't find a .htaccess file, you can create your own, but once again, check with your hosting service first for guidelines. Be sure to use a plain text editor and name the file ".htaccess" (notice the "." preceding the file name).

3. Edit your .htaccess file

Add the following lines to the end of the file (examples provided as a guideline - alter path and file names to point towards your error pages)

ErrorDocument 404 http://site.com/folder/404.htm
ErrorDocument 403 http://site.com/folder/403.htm
ErrorDocument 401 http://site.com/folder/401.htm 

Upload the .htacess file back to the root of your web in ASCII mode and you should be good to go. Try it out by typing in a non existent URL on your site.

Custom error pages are simple to create, help you to increase your site's traffic by retaining wayward visitors and also encourage better visitor/customer relations.

Further note on renaming files

While a custom error page acts as a good backup to try and keep visitors on your site for more random errors such as malformed browser requests; there is a better method to use if you must rename files - a 301 redirect. This will seamlessly take your visitor to the renamed page. More importantly, it's search engine friendly, so it can help maintain the rankings you had for the old page. Learn more about 301 redirects.

Michael Bloch
Taming the Beast
http://www.tamingthebeast.net 
Tutorials, web content, tools and software.
Web Marketing, Internet Development & Ecommerce Resources
____________________________

Copyright information.... This article is free for reproduction but must be reproduced in its entirety along with live links & this copyright statement must be included. Visit http://www.tamingthebeast.net  for free Internet marketing and web development articles, tutorials and tools! Subscribe for free to our popular ecommerce/web design ezine!

Click here to view article index 

Online meeting & webinar software review
Powerful, easy to use collaboration tools that can help improve your marketing sales and training efforts. Learn more about these services in this review & try a free trial!

The best shopping cart software
Our reviews of some of the best shopping carts around - free ecommerce solutions  through to premium services offering affiliate programs, marketing modules & online soft goods delivery.  Shopping cart software guide 

Autoresponder software/mailing list manager
 Read our beginners guide and reviews of all-in-one autoresponder & email marketing software solutions.

Credit card transaction fraud screening!  Effective fraud screening is an essential part of running an online businesses. Fraud transactions cost you money and can threaten your merchant account. Pick up a stack of transaction screening tips in this free guide! 

Need some advice/tools for writing/creating a web design, development or marketing proposal?

 

 

 

Home

TTB is powered by renewable energy our office is powered by:
Learn more about our social and environmental commitment

 

Return to top of page 

Get paid cash taking online surveys - free to join online 
survey companies that will pay you cash for your opinion!

In Loving Memory - Mignon Ann Bloch

copyright (c) 1999-2007  Taming the Beast  Adelaide - South Australia 

Profile - Contact - Privacy - Advertise - Site Resources - Consultants Portfolio 

Search Site - Terms of Service - Usability Issues