Setting Up Custom Error Documents on Plesk 10 Linux VPS

Please add this code to your .htaccess file in the httpdocs directory.

ErrorDocument 403 /403.shtml
ErrorDocument 404 /404.shtml
ErrorDocument 500 /500.shtml

Next create a file named 403.shtml in your httpdocs folder. Now the 403 errors will yield the 403.shtml page. Repeat for 404.shtml and 500.shtml.

You can even use existing pages as the resulting page. Say you don't want any visitors seeing 404 errors on your site. You can make your home page the result, like so:

ErrorDocument 404 /index.html

If Internet Explorer is not displaying the custom error page, it is likely because the error page must be larger than 1 kilobyte.

There are many error pages which may be defined.

Client Request Errors
400 - Bad Request
401 - Authorization Required
403 - Forbidden
404 - Not Found
405 - Method Not Allowed
406 - Not Acceptable (encoding)
407 - Proxy Authentication Required
408 - Request Timed Out
409 - Conflicting Request
410 - Gone
411 - Content Length Required
412 - Precondition Failed
413 - Request Entity Too Long
414 - Request URI Too Long
415 - Unsupported Media Type

Server Errors
500 - Internal Server Error
501 - Not Implemented
502 - Bad Gateway
503 - Service Unavailable
504 - Gateway Timeout
505 - HTTP Version Not Supported