Error Pages: The 404 Experience
404 pages have always been (and will always be) with us. You can't stop people from mis-typing URLs, and you may not be absolutely always put up pages that are perfectly linked, and even if you do, a year later when you move that directory, those links will likely break and crumble like eggs for an omelet.
If your site has been around for any length of time, people will have linked to certain pages. When I worked at OMSI many people had linked to a wide variety of resources on the site. Under the hood however (because the site had developed organically) the various parts of the site were getting more and more difficult for the web developer to wrap a brain around. The locations for certain files could have been anywhere, and the directories of the files didn't match up with the hierarchy of the information on the site.
There were other problems as well. Many directories did not have default pages (index.html or default.html) so those needed to be added. Some pages had the extension .htm rather than .html. These are travesties by any means, but the more organized a site is, the easier it is to jump into and work with.
To bring uniformity to the site, I had to move pages to new directories, change filenames and directory names. This was going to break links, it was obvious.
(Many of the changes could have been done by modifying the configuration file for the Apache web server, but while that worked for certain directories, I wanted robots and search engines to update their links as well. I didn't want these patches to be _too_ transparent.)
So what's a self-respecting web developer to do? You're supposed to make it easy for people to get to where they want to go. And if possible, send them there automagically, but if not, you ought to give them a range of options for getting there themselves.
(Modifying the default 404 page varies by web server. In Apache, you create a file with the name '.htaccess' with the following line in it: ErrorDocument 404 /error404.html. This .htaccess file can often be put in customer directories (like those that have a ~ in the address). For MS IIS, there are pages created during the installation that you can modify.)
Here are some of the techniques I used on the 'File Not Found' error pages, aka the 404 page:
3) Show them a site map, or or at least an obvious link to it, and give them the option to use the local search engine, if there is one. Make sure to keep your site map (really a site index) up to date, and make sure the search engine is working well.
4) Tell them who to contact. The last option should give them the option to talk to a real person. It's been my experience that you don't get a lot of people getting this far in the process, because you've already given them a lot of tools to fix their problem on their own.
5) Another tool that you may add if you find yourself dropping content from your site is a Web Trash Can, which I've defined in greater detail here.
6) Humor. No one likes to be lost, or not be able to find what they want. On the OMSI 404 page I added a Web Haiku that was taken from Salon Magazine. No one likes errors, but they might as well buoy the spirit rather than bring it down further.
These are some of the options you can give your visitors, and they're the ones that I use the most often. Remember: Make your error pages Useful and Light-hearted. This will make your visitors feel powerful and happy.
Further Reading... Some suggestions and examples of 404 pages: Improving the Dreaded 404 Error Message by Jakob Nielsen (Thanx to Lawrence Lee), Slashdot's 404 helps you fix misposted URL from their discussion boards. From Webmonkey I was pointed to Pliko.net's Great 404's page.
P.S. Keep an eye on your error log. By looking this over, you can often find where people are going wrong and not finding what they want from you. Use this information to patch and error-proof your web site.