As you know if you've spent any time at all surfing web, sometimes you will see dreaded 404 error condition. This often occurs because you've entered an incorrect link (perhaps added a ".html" instead of ".htm" at end of file) or perhaps because a site has been updated recently and some links were broken.
Virtually all web sites (especially free sites) have some generic 404 error page displayed when this occurs. This error pages is either (a) completely unhelpful to a visitor or more likely (b) is very useful advertising for a web host but completely useless for helping your users navigate your site.
One excellent reason for choosing a paid host over a free host is that you can generally modify .htaccess file to provide a custom 404 error page. (This is an important feature to demand from a paid host - if they don't let you use this feature, find another host. This is also an excellent reason to choose a host which runs Apache server software over other brands. For example, Microsoft's Internet Information Server, IIS for short, does not allow for this capability).
So let's say you create a 404 error page. What do you do with it? It's simple - you help your visitors get back to looking around your site.
Tell them what happened - An error occurred, specifically a page was requested and not found.
Make sure they understand they are still on your site - Sometimes this is not clear, so be sure you include your logo and other identifications. In fact, standard 404 error code often means you will lose that visitor forever because he will immediately assume site is abandoned.
Give them some reasons why error occurred - Most people do not know what "404 error" means. Be sure and give your visitors some tips as to what might have gone wrong. Perhaps they misspelled URL or a link was bad?
Help them get back to surfing your site - Give them plenty of ways to navigate back into your site. Ideally, include your standard navigation menu and perhaps even a search option.
Inject a little humor - A joke or funny picture can help lighten up mood. Remember, you are presenting an error - you want to get them to smile so they perhaps continue surfing.
Be sure your page is over 1,024 bytes in size - Some browsers will not display error pages that are smaller than this.
The most important thing to remember is that an error message is stressful to your visitors. These immediately give impression that your site is poorly maintained or perhaps even has been abandoned. You only have a few seconds after error occurs to get people back to surfing your site, so you had better use that time wisely.