Adding custom error pages Print

  • 2

Instead of the default custom error pages, you can create your own, more friendly, custom error pages. Currently Plesk supports most of the custom errors:

You have two options:

Set the error documents through the control panel

1. Switch on custom error page support

  • Login to your control panel
  • Go to Websites & Domains
  • Locate your domain and click Hosting Settings
  • Check the Custom error documents checkbox
  • Click OK
2. Select File manager from control panel or Connect to your FTP account, go to the error_docs directory of the specific website
3. You can see a list of files. Edit or replace the respective files, make sure to preserve the correct file names.
    Here are the list of error types and files supported by Plesk control panel:
  • 400 Bad File Request - bad_request.html
  • 401 Unauthorized - unauthorized.html
  • 403 Forbidden/Access denied - forbidden.html
  • 404 Not Found - not_found.html
  • 405 Method Not Allowed - method_not_allowed.html
  • 406 Not Acceptable - not_acceptable.html
  • 407 Proxy Authentication Required - proxy_authentication_required.html
  • 412 Precondition Failed - precondition_failed.html
  • 414 Request-URI Too Long - request-uri_too_long.html
  • 415 Unsupported Media Type - unsupported_media_type.html
  • 500 Internal Server Error - internal_server_error.html
  • 501 Not Implemented - not_implemented.html
  • 502 Bad Gateway - bad_gateway.html
  • 503 Service Temporarily Unavailable - maintenance.html

Adding error pages through .htaccess page

You can add custom Error pages by placing the following line in your .htaccess page:

ErrorDocument error_number /some_file.html

e.g. Here's the line that will set file /err404.html as a default Error 404 page:

ErrorDocument 404 /err404.html


 


Was this answer helpful?

« Back