Saturday, November 20, 2010

Creating Customized 404 File Not Found HTML Page

Okay, you enter a url of a site in the address bar of your browser or you navigate from one page to another and what your browser displays is an error: page not found. And you just hit the back buttom to your disappointment. File not found errors are encountered when a url is typed incorrectly or the file has been removed or renamed.
For webmasters, creating a customized 404 file not found page is helpful to maintain the focus of visitors on your site. If the site is hosted on Apache servers, a simple tweak on the .htaccess file does the magic. For sites hosted on non-Apache servers, it is advisable to ask help from the hosting provider about 404 error page customization.

To create a customized 404 file not found page, locate the .htaccess file in the root directory of your site and add the following: ErrorDocument 404 /notfound.html. The "notfound.html" is the page that is going to be displayed when the typed url is not found. This page must provide some sort of links going to your site, it can be a link to the home page or to the sitemap.

When the customized error page is done, it must be uploaded along with the .htaccess file to your site. Make sure that the created customized notfound page works as expected, with all the links on it.

In summary, a customized 404 page may prevent losing of visitors by providing links relative to site content. It is a good practice to save visitors and giving them ways to discover your pages.

No comments:

Post a Comment