Once you've created a Web site, you should consider creating a 404 "Page Not Found" error page that helps both your readers and yourself to get more out of the Web site. Here are some tips to creating a better 404 page.
- Don't redirect your 404 page to your homepage.
Many sites do this, including About, and it's often an irresistible temptation. But it's actually worse than having just the plain "Page Not Found" error. Redirecting to the homepage messes both with scripts and programs that use the 404 HTTP code to display information, such as search engines and link checkers. But it also confuses your readers. In fact, it has confused me on my site on About - I click a link that should go to a specific article and I end up on the homepage. And I think "huh?" And I know that the site is set up like that, what must my readers be thinking? (Unfortunately, this functionality is not up to me.)
- Don't assume your readers know what they were looking for.
Chances are, they clicked on a link from another site, and really don't know the layout of your Web site. Put a search box on the 404 page, but include other information and links. In fact, making this page fairly link heavy is a good idea - just keep them clearly categorized so that your customers can find what they were looking for.
- Don't try to guess why they got the bad link.
Putting messages like "we just reorganized our site" on your 404 page makes the page outdated almost immediately. If they got to that page because they mistyped the URL themselves, that just seems strange.
- Give suggestions on what your reader can do to find the missing page.
The eBay 404 Page does this well. The idea is to provide alternate ways to get to the information, either by checking the URL for obvious typos, navigating to the page from a directory, or doing a search. Finally, remind your customers that the page may simply be gone.
- Keep your site navigation on the 404 page.
It can be very disconcerting to click a link and arrive at a completely white page that has in huge letters "Page Not Found". If you leave in your standard site navigation the page doesn't look as barren and your customers can at least use that navigation to find the page they want.
- Script your 404 page, if possible.
The best 404 pages are the ones that look at all the information available and provide a customized response to the customer. Information that can be used includes:
- The URL that was not found
- The referring page
- The area of the site the customer would be in or came from (if you organize your site in URL directories).
- Include a report form to report the error.
Make it easy for your customers to report bad links to you. On the 404 page, include a form that details the URL of the page not found, the URL of the referring page, and any other details you want to collect. Better still would be to collect that information automatically in your server logs and review the report periodically. You can then contact sites which refer people to bad URLs and set up redirects to popular pages that come up wrong.
- Set up redirects for popular 404 pages.
Sometimes there are common misspellings and typos that people write when they put in your Web pages. If you've been perusing your 404 report, you'll know what those are. You can then set up redirects to the correct page, so that your customer doesn't even know there was a typo.