Thursday, April 5, 2007

Make the most out of your error pages

Wow, has it been a long time since I posted. I'll try to do better with shorter posts but more frequent.
Today's topic is the dreaded "404 not found error message". No matter how well you've designed and checked your site, some of your visitors will see this error message. You just can't control if people mistype a URL or if someone links to you with a typo-laden url.
Imagine the experience of a user who comes through one of those bad links. Are they going to find the typo and correct it? Unlikely I say, they'll probably just leave.
The solution is to create a custom error page. Make it look like the rest of the site, include a nice error message, and include links back to your homepage and to search/sitemap pages if you have them. Many webhosts will allow you to set a custom error page through your control panel. On an Apache server, you can also add this feature with one line of code in an .htaccess file. (Google ".htaccess" and "ErrorDocument" for more info). Once you have the feature up, double check that your server is still sending a 404 response (your viewers won't see this, but the search engines will). It's very important that the search engines see this or you might get hit with a duplicate content penalty. You can check your headers here.
I did a google search for pages named 404 to find a good example for you. Check out this video tutorial site. Once there, add a random file name (like ad8df.html) and see what comes up. Much nicer than the standard "404 file not found" page, isn't it?

Tags: , ,

0 comments: