Loading...

Knowledge Base
Save up to  70% off.  Start your website today!

Setup Custom Error Docs on Plesk 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 use the existing pages as the resulting page. Say you do not want any visitors seeing the 404 errors on your site. You can make your homepage show the result, like so:

ErrorDocument 404 /index.html

If the Internet Explorer is not displaying the custom error page, it is likely due to the error page being larger than 1 kilobyte.

There are many error pages that 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
 

Did you find this article helpful?

 
* Your feedback is too short

Loading...