Search  
   
Browse by Category
 
Netfirms 24/7 Support .: SITE: DESIGN, PUBLISHING & FTP .: G. Features Supported .: How do I create a custom 404 error page?

How do I create a custom 404 error page?

To construct a custom error page, you should enable .htaccess for your site first.

I. To enable the .htaccess feature, please log into your Members section, then follow the steps below:

1. Click Hosting
2. Click Settings
3. From the .htaccess section, use the pull-down menu option to choose enable
4. Click Update

II. Then follow the instructions below to create your custom error page:

1. Using a text editor (eg. Notepad), enter the following (where yourdomain.com is your domain name):

ErrorDocument 404 http://www.yourdomain.com/notfound.html

2. The above example will display the web page "notfound.html" in cases where the requested URL is not found.

If you remove a web page from your site and someone tries to view it, they would see the contents of notfound.html instead.

You can also tell .htaccess to display a text message.

ErrorDocument 404 "No such document here"
Here, the text 'No such document here' is shown.

3. Once your .htaccess file and notfound.html (or whatever filename you choose) have been created you may upload them to the remote server via FTP. Please ensure that the .htaccess is uploaded in ASCII mode.

NOTE: You can configure .htaccess to redirect a visitor visiting a non-existing asp page to a custom error page as long as your hosting plan supports Windows hosting (eg. Business hosting plans and higher). Since our webservers are Windows aware, it tries to process the asp script before making a determination whether the asp file exists or not. As such, using htaccess will not work to redirect them to a custom error page because it will simply err with Service Unavailable (on ADV plan, ASP is not supported). That is, the redirection will not work if the (asp) file does not exist.

TROUBLESHOOTING:
We recommend that you make small changes to .htaccess saving frequently, and testing your site. That way, you'll know when you've made a mistake, and will be able to quickly roll the change back. If after you configure an .htaccess file your website displays a 500 Internal Server Error, please review your newly created .htaccess file to ensure that you have followed the above instructions properly.

How helpful was this article to you?


.: Powered by Lore 1.5.6
Visit Netfirms.com Web Hosting | Copyright © 1998 - 2009 Netfirms, Inc. All Rights Reserved.