HOME    articles    tutorials    tool directory    about

Free Email
META Tag Generator

Custom Error Pages

Banish generic 404 error pages from your Web site

Have you ever wondered why a bad link to some Web sites brings up a generic "The page can not be found" message (example) while others serve up a page that matches the style of the Web site (example)? The generic message is the result of browser and server defaults - i.e. that's what you get if the Webmaster hasn't taken steps to provide a custom error page.

Even on the most rigorously policed Web site, page not found errors still occur. Other sites may provide bad links to yours, a user may mistype a URL, or search engines may contain links to pages on your site that have been removed long ago.

Fortunately, setting up a custom error page is really quite simple. The custom page can be substantially less jarring than the generic default. It can make the difference between the visitor staying on your site, or leaving immediately. To set one up on your Web site, follow these five steps:

  1. Design a new "not found" error page
  2. Place the new error page on your Web site
  3. Create an .htaccess file so the new page is used
  4. Upload the .htaccess file
  5. Test it

Step 1: Design a New "Not Found" Error Page
Your new custom error page should be designed to mimic the look and feel of the rest of your Web site. Use the same graphics, navigation, colors, and fonts. Good items to incorporate include:

  • a brief message explaining the error
  • a searchbox if you have a search function on your Web site
  • a link to your home page
  • an email link to the Webmaster so users can send a message if they wish.
Save the page with a name that will remind you what it contains, such as 404error.html

Step 2: Place the New Error Page on Your Web Site
Upload the page you just created to the root directory of your Web site (where your home page is located). You can put it in its own subdirectory if you wish, but if you do so, make careful note of the exact path to its location. Use your Web browser to view the page and verify that it looks the way you intended.

Step 3: Create an .htaccess File so the New Page is Used
Now that you've created and uploaded the custom error page, you need to let your Web server know it should be used. This is accomplished through a file named .htaccess. The dot at the beginning of the name identifies .htaccess as a system file, rather than a public file.

Since many ftp programs won't show (or transfer) files with names that begin with a dot, we'll need to use a little work-around. The work-around is that we'll temporarily name the file htaccess.txt, and rename it to .htaccess later.

next page

HOME    articles    tutorials    tool directory    about

(c) copyright 2000-2010 Anventure.  All Rights Reserved.
privacy policy