Creating Customised Error PagesImproving usability with customised 404 error pages
Before explaining the best method for creating error pages, it is best to clear-up exactly what the error page is. What is an error page?While there are many different types of error pages for many different types of errors - the main one is the Error 404 "Page not found". This is the error page displayed when someone asks for a page on your site that simply does not exist. This is usually because there is a link on your site that wasn't quite correct, but sometimes they can be for other reasons like the page has been recently removed from the site. Because there is no page to display, the web server sends a page to the user that simply says "404 Page not found". An example of this standard page is here - Error Page. Why would we want to change the standard error page?There are a few major things wrong with the standard error page. These are:
How do we set our own error page?Setting your own error page is easy. First, simply write one. You will want to try and address the issues mentioned above. Use your standard page template so the look of your page is consistent, and explain in non-technical language that the page no longer exists at that address. Also, make sure that you offer your visitor a link to your home page or the major sections of the site where they would likely find information. A very important thing to remember is that error pages should always use "absolute links" to images and other pages. Absolute links refer to an image on your page by its full address. Eg. Do not use "./image.gif" to refer to your image, use "http://www.mydomain.com/image.gif". If you do not use relative links your visitors will see missing images and broken links sometimes on your error page. Talk about kicking them when they're down! Once you have your error page, uploading it so it will display when there is an error is the easy part. First, name the page 404.shtml. Then, simply upload into your public_html directory using your usual method for publishing your web pages. To test your 404 error page just try to go to a page that you know does not exist on your site, and you should see your nice, friendly, customised 404 error page. See further general website hosting FAQs or our FAQ categories for more information. Please contact us if you have a question that is not answered on our site. Other Frequently Asked Questions Categories
|
| © ServerGrade.com.au 2010 TOS Privacy Policy | PO Box 1515 Canberra, ACT, Australia 2601 |