CUSTOMIZING WEB SERVER ERROR MESSAGES 404 Print

  • 0

When visitors coming to a site request pages that the Web server cannot find, the Web server generates and displays a standard HTML page with an error message. The standard error messages may inform of problems, but they do not usually say how to resolve them or how to get the lost visitor on his way, and they also look dull.

You may want to create your own error pages and use them on your Web server. The following error messages are the ones customized most often:

 

400 Bad File Request. Usually means the syntax used in the URL is incorrect (for example, uppercase letter should be lowercase letter; wrong punctuation marks).

401 Unauthorized. Server is looking for some encryption key from the client and is not getting it. Also, wrong password may have been entered.

403 Forbidden/Access denied. Similar to 401; a special permission is needed to access the site – a password and/or username if it is a registration issue.

404 Not Found. Server cannot find the requested file. File has either been moved or deleted, or the wrong URL or document name was entered. This is the most common error.

500 Internal Server Error. Could not retrieve the HTML document because of server-configuration problems.

To configure Parallels Plesk Panel's Web server to show custom error pages for a domain:

 

Switch on support for custom error documents through Parallels Plesk Panel.

Go to Domains > domain name > Web Hosting Settings.

Select the Custom error documents check box.

Click OK.

Go to Domains > domain name > Virtual Directories to see the list of error documents for the root Web directory (error documents located here are used for all domain Web pages). If you want to customize error pages for a certain Web directory, go to that directory.

Click the Error Documents tab and click the required error document in the list.

To use the default document provided by IIS for this error page, select Default in the Type menu.

To use a custom HTML document already located in the error_docs directory on a domain, select File in the Type menu and specify the file name in the Location field.

To use a custom HTML document located in directory other than error_docs on a domain, select URL in the Type menu and enter the path to your document in the Location field. The path should be relative to the virtual host root (that is, <vhosts>\<domain>\httpdocs).

For example, you have created a file forbidden_403_1.html and saved it in the my_errors directory located in the httpdocs. To use this file as an error document, the following path should be entered in the Location filed: /my_errors/forbidden_403_1.html.


Was this answer helpful?

« Back