Hosting: How Do I Setup Custom Error Pages?
When someone visits your website, and clicks on a link that takes them to a web page that does not exist, you can show them a customised error page. By using a custom error page, you can make your website more friendly by providing links back to your main site.
To get started, you should create an error page for a file that cannot be found on your website - or a 404 error as it is know. Upload this to the public_html or www folder within your webspace as, for example, notfound.html
Next, you should create a new file called .htaccess - we recommend that you create this file in Notepad (Start > All Programs > Accessories) - when saving the file, make sure you save the file under 'all files', and not as a text document.
Within the .htaccess file, add the following line to the contents of the file;
ErrorDocument 404 /notfound.html
Save the file, and upload this to the public_html or www folder within your webspace. Now if you type in a random file name, that does not already exist, you should be taken to your customer file not found (or 404) page.
You can add more error pages, covering a variety of errors to your .htaccess file - whilst remembering to create and save the error page as the recommended titles below;
ErrorDocument 400 /badrequest.html
ErrorDocument 401 /authorization.html
ErrorDocument 403 /forbidden.html
ErrorDocument 404 /notfound.html
ErrorDocument 500 /internalserver.html
Please note that some FTP clients may not allow you to view the .htaccess file because it is normally hidden. You can still create and upload the file even though you may not be able to see it.
Go back to the page you were viewing


