How to Create a Custom 404 Error Page:
(And Get Your Lost Visitors Back!)
First Published: February 2003
Last Update: February 2003
Author: Merle http://www.EzineAdAuction.com
One thing that's certain on the Web is nothing stays the same for very
long. This is especially true when it comes to pages of your website. When
you first create your site you may think you'll never need to alter the
structure. But as your site grows, chances are there will come a day when
you need to move or change the names of existing pages.
So what's the problem, you ask? Well, if you've been busy promoting
your website (and you should be) specific pages are going to be out there
in "cyberspace" listed in search engines, on other websites in
the form of link swaps, in directories, articles, etc. It would be
impossible to contact all of these people and give them the new url- So
what's a Webmaster to do? Create a custom 404 error page.
Create a custom 404 error page
A custom 404 error page is a special HTML page that you create on your
server that automatically comes up if someone types in a wrong url,
misspells a url, or tries to call a page from your server that no longer
exists. By creating one of these pages you can capture what would be
"lost traffic" and send them to the correct place or guide them
to a new page.
So what does a good custom error page contain? There are important
ingredients you'll want to include:
1) Contact Info: Tell them how they can reach you by email or phone.
2) Brief Explanation: Tell them why they have reached a page that no
longer exists or has been moved and give them other options.
3) Include a valid link menu, site map or search function so they may
still find what they are looking for, or perhaps another page.
Deploying your custom 404 error page
So now that you know what to include in your error page you need to
create it, and give it a name -- something like "error404.html."
Once that's done, you need to connect to your web server and look in
the root directory for a file called .htaccess You may not see it using
your FTP program because all files that start with a dot are hidden under
UNIX and Linux systems. You can fix that by changing your file display
filter to "-la" (list all).
If you still don't see it you'll need to create it. Make sure it is
named with the .dot in front of the htaccess, like this: .htaccess. If the
file is already there, open it up and add the complete path to your error
page like this:
ErrorDocument 404 http://YourDonain.com/404errorpage.html
Make sure the text is all typed on 1 line and you leave a space on both
sides of the 404 part and that the E and the D in ErrorDocument is in
caps.
Now just FTP this revised .htaccess page and your 404errorpage.html up
to your server and you're done. Test it by typing an incorrect url into
your browser and make sure your new error page is working correctly.
From now on you'll never need to worry about losing another visitor
due to 'rearranging the furniture," so to speak. By helping your
visitors get to where they want to go, you'll be helping them and yourself
to a visitor who would otherwise been lost in space- and that's a good
thing!
About the Author
Merle (just Merle, thank you) is an experienced Internet
Marketer/Promoter. She knows what it takes for business websites to be
successful. She has been online for over four years and has two other
websites to her credit: MC Promotions and Merle's World.
Merle says she "loves the Internet." She also enjoys helping
others with their marketing and design questions or problems. Her articles
on website design and promotion have been published in various
publications online. She has also written two E-books, which are free to
download: Merle's Mission Anniversary Edition, and Secrets of Business in
the New Millennium.
Merle lives in a suburb right outside of Cleveland, Ohio with her two
dogs, Teddy and Dakota, and her fiancée. Her hobbies include reading
(especially anything Net-related), writing and publishing her two ezines,
MC Promotions Press and Merle's Mission with a combined subscriber base of
well over 10,000. Feel free to contact her with any questions.
Links to other SEO resources and information:
Below are some Search Engine Optimization books you may find interesting:
|