Creating and using yourcustom Error 404 Page (Page not found error)


-Making It-

Start with a simple friendly statement that the requested page could not be found and invite them to browse (or search) your site. Don't use the term 'Error' since this is likely to put visitors off.
Use the same look and feel for the page as you have used for the rest of your site. Include common navigation elements if this is consistent with the rest of your site. It should include the URL of your site.
Consider including a search box so the visitor can search your site for what they are looking for.
Some web servers allow 404 pages to be defined for different folders/directories. If your web server supports this and your site is logically portioned into separate sections (within different folders) then consider whether it is worth having different custom 404 pages for each section.
You probably won't want web-bots to spider your custom 404 page (they will only get there by following a broken link) otherwise for example your custom 404 page might be included in search engine results! To request any web bots to ignore the page include the following meta tag within the <head> </head> tags at the top of your page:
<meta name="robots" content="noindex, nofollow">
Internet Explorer 5 has a problem displaying custom 404 pages if they are too small. To avoid this problem ensure that your custom 404 page is at least 512 bytes. For more information see the Microsoft knowledge base article Q218155.

-Configuring your server to use it.-

In the .htacess file, and write anyway ErrorDocument 404 https://www.yourdomain.com/custom404page.htm (replace yourdomain.com with your site url.)
Tom's Avatar
Author:
Views:
1,512
Rating:
There are currently no comments for this tutorial, login or register to leave one.