Skip to content
  • Contact us: +34 944 58 06 58
  • Plesk Partner Program
  • Plesk Lifecycle Policy
  • Blog
  • Contact us
  • Plesk 360
  • Contact us: +34 944 58 06 58
  • Plesk Partner Program
  • Plesk Lifecycle Policy
  • Blog
  • Contact us
  • Plesk 360
  • Solutions
    By Role
    • Developers
    • Content Managers
    • Digital Agencies
    • IT Admins
    • Web Hosters
    • Hyperscalers
    • Developers
    • Content Managers
    • Digital Agencies
    • IT Admins
    • Web Hosters
    • Hyperscalers
    By Edition
    • Web Admin Edition
    • Web Pro Edition
    • Web Host Edition
    • Business & Collaboration
    • Plesk WP Edition
    • Web Admin Edition
    • Web Pro Edition
    • Web Host Edition
    • Business & Collaboration
    • Plesk WP Edition
    By Cloud
    • Amazon Web Services
    • Microsoft Azure
    • Alibaba Cloud
    • GCP Marketplace
    • Vultr
    • DigitalOcean
    • Linode
    • UpCloud
    • Amazon Web Services
    • Microsoft Azure
    • Alibaba Cloud
    • GCP Marketplace
    • Vultr
    • DigitalOcean
    • Linode
    • UpCloud
    Partner Program
    Exclusive discounts, benefits and exposure to take your business to the next level
    Become a partner
    • By Role
      • Developers
      • Content Managers
      • Digital Agencies
      • IT Admins
      • Web Hosters
      • Hyperscalers
    • By Edition
      • Web Admin Edition
      • Web Pro Edition
      • Web Host Edition
      • Business & Collaboration
      • WP Edition
    • By Cloud
      • Amazon Web Services
      • Microsoft Azure
      • Alibaba Cloud
      • GCP Marketplace
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
    • Partner Program
      • Partner Program
  • Product
    Explore Features
    • Everyone
    • Admins & Web Hosters
    • Developers
    • Designers & Agencies
    • Plesk Features
    • Everyone
    • Admins & Web Hosters
    • Developers
    • Designers & Agencies
    • Plesk Features
    Key Topics
    • SocialBee
    • WP Toolkit
    • Sitejet Builder
    • SEO Toolkit
    • Joomla! Toolkit
    • Plesk Premium Email
    • Plesk Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder
    • SEO Toolkit
    • Joomla! Toolkit
    • Plesk Premium Email
    • Plesk Email Security
    Feature Packs
    • Business & Collaboration
    • WP Pack
    • Hosting Pack
    • Power Pack
    • Language Pack
    • Business & Collaboration
    • WP Pack
    • Hosting Pack
    • Power Pack
    • Language Pack
    Featured Extension
    SocialBee
    • Explore Features
      • Everyone
      • Admins & Web Hosters
      • Developers
      • Designers & Agencies
      • Plesk Features
    • Key Topics
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Plesk Premium Email
      • Plesk Email Security
    • Feature Packs
      • Business & Collaboration
      • WP Pack
      • Hosting Pack
      • Power Pack
      • Language Pack
    • Featured Extension
      • Extension
  • Pricing
  • Extensions
  • Help Center
  • More
    • Careers
    • Events
    • Plesk University
  • FREE TRIAL
  • Solutions
    • By Role
      • Developers
      • Content Managers
      • Digital Agencies
      • IT Admins
      • Web Hosters
      • Hyperscalers
    • By Edition
      • Web Admin Edition
      • Web Pro Edition
      • Web Host Edition
      • Business & Collaboration
      • WP Edition
    • By Cloud
      • Amazon Web Services
      • Microsoft Azure
      • Alibaba Cloud
      • GCP Marketplace
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
    • Partner Program
      • Partner Program
  • Product
    • Explore Features
      • Everyone
      • Admins & Web Hosters
      • Developers
      • Designers & Agencies
      • Plesk Features
    • Key Topics
      • SocialBee
      • WP Toolkit
      • Sitejet Builder
      • SEO Toolkit
      • Joomla! Toolkit
      • Plesk Premium Email
      • Plesk Email Security
    • Feature Packs
      • Business & Collaboration
      • WP Pack
      • Hosting Pack
      • Power Pack
      • Language Pack
    • Featured Extension
      • SocialBee
  • Pricing
  • Extensions
  • Help center
  • More
    • Careers
    • Events
    • Plesk University
    • Blog
    • Plesk Partner Program
    • Contact Us
  • FREE TRIAL
  • Solutions
    • By Role
      • Developers
      • Content Managers
      • Digital Agencies
      • IT Admins
      • Web Hosters
      • Hyperscalers
    • By Edition
      • Web Admin Edition
      • Web Pro Edition
      • Web Host Edition
      • Business & Collaboration
      • WP Edition
    • By Cloud
      • Amazon Web Services
      • Microsoft Azure
      • Alibaba Cloud
      • GCP Marketplace
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
    • Partner Program
      • Partner Program
  • Product
    • Explore Features
      • Everyone
      • Admins & Web Hosters
      • Developers
      • Designers & Agencies
      • Plesk Features
    • Key Topics
      • SocialBee
      • WP Toolkit
      • Sitejet Builder
      • SEO Toolkit
      • Joomla! Toolkit
      • Plesk Premium Email
      • Plesk Email Security
    • Feature Packs
      • Business & Collaboration
      • WP Pack
      • Hosting Pack
      • Power Pack
      • Language Pack
    • Featured Extension
      • SocialBee
  • Pricing
  • Extensions
  • Help center
  • More
    • Careers
    • Events
    • Plesk University
    • Blog
    • Plesk Partner Program
    • Contact Us
  • FREE TRIAL

Knowledge Base

How to enable custom error pages for a domain in Plesk

 
apachedomainsfile managergohosting

How to set up custom error pages for a domain in Plesk?

Answer

Note: In some cases, custom error pages may not work properly due to customized domain configuration (in .htaccess file, additional Apache/nginx directives on Linux and web.config file on Windows Server).

 

For Linux

 

Enabling default error pages provided by Plesk

 

  • If Proxy Mode is enabled at Domains > example.com > Apache & nginx Settings, then: go to Domains > example.com > Hosting Settings and enable the Custom error documents setting:

    Note: If PHP is run as PHP-FPM application served by Apache, add "ProxyErrorOverride on" to the additional HTTP/HTTPS directives at Domains > example.com > Apache & nginx Settings.

    Hosting Settings

     

  • If Proxy Mode is disabled at Domains > example.com > Apache & nginx Settings, add the following content to Additional nginx directives field:

    Notes: The Additional nginx directives field is available to Plesk administrator only. If you are a domain owner, please contact your service provider for assistance with configuration of error pages.

    To apply these settings for all new domains created under a particular service plan, go to Service Plans > Example Plan > Web Server tab and add the below lines to the Additional nginx directives field.

    fastcgi_intercept_errors on;

    location ^~ /error_docs/ { root /var/www/vhosts/example.com/; }

    error_page 400 /error_docs/bad_request.html;
    error_page 401 /error_docs/unauthorized.html;
    error_page 403 /error_docs/forbidden.html;
    error_page 404 /error_docs/not_found.html;
    error_page 405 /error_docs/method_not_allowed.html;
    error_page 406 /error_docs/not_acceptable.html;
    error_page 407 /error_docs/proxy_authentication_required.html;
    error_page 412 /error_docs/precondition_failed.html;
    error_page 414 /error_docs/request-uri_too_long.html;
    error_page 415 /error_docs/unsupported_media_type.html;
    error_page 500 /error_docs/external_server_error.html;
    error_page 501 /error_docs/not_implemented.html;
    error_page 502 /error_docs/bad_gateway.html;
    error_page 503 /error_docs/maintenance.html;

 

Configuring custom HTML error pages

 

  1. In Plesk, go to Domains > example.com > File Manager > click Home directory > then click Screenshot_2018-11-21_File_Manager_for_example_com_-_Plesk_Onyx_17_8_11_1_.png and create a new directory for your custom error pages (For example, custom_error_pages).

    File Manager

  2. Create/upload your HTML error pages to the newly created directory.

  3. Configure error pages:

    Note: Add only those error code lines, for which custom error pages exist in your directory.

    • If Proxy Mode is enabled at Domains > example.com > Apache & nginx Settings:

      Go to Domains > example.com > Apache & nginx Settings and add the following content to the Additional directives for HTTP and Additional directives for HTTPS. Replace custom_error_pages in each line, if your directory has a different name:

      Alias /custom_error_pages /var/www/vhosts/example.com/custom_error_pages

      ErrorDocument 400 /custom_error_pages/bad_request.html
      ErrorDocument 401 /custom_error_pages/unauthorized.html
      ErrorDocument 403 /custom_error_pages/forbidden.html
      ErrorDocument 404 /custom_error_pages/not_found.html
      ErrorDocument 405 /custom_error_pages/method_not_allowed.html
      ErrorDocument 406 /custom_error_pages/not_acceptable.html
      ErrorDocument 407 /custom_error_pages/proxy_authentication…

Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

Securing the WordPress Frontier with WP Guardian

Read More »

Introducing WP Guardian Vulnerability Protection: Now available for WP Toolkit

Read More »

How to Host a Go App on Plesk

Read More »
Knowledge Base

 How to enable redirection from HTTP to HTTPS for a domain in Plesk

Read More »

Unable to issue a Let’s Encrypt certificate: The token file is either unreadable or does not have the read permission

Read More »

How to enable Server Side Includes (SSI) support in Plesk?

Read More »

How to find and edit PHP configuration files in Plesk for a domain or for global PHP handler

Read More »

Hosting Wiki

  • Django
  • Server Redundancy
  • Linux Containers
  • Google Cloud CDN
  • htaccess
  • Bare Metal Server
  • PhpMyAdmin
  • phpPgAdmin
  • Oracle VM Server
  • Server Virtualization Software
  • Windows Server
  • Linux
  • PHP
  • HTML
  • MongoDB
  • HTTP/3
  • HTTP/2
  • Domain
  • Hosting Control Panel
  • Plesk
  • Lighttpd
  • Apache Tomcat
  • NGINX
  • Apache
  • Web Server
  • DNS Server
  • Colocation Hosting
  • Reseller Hosting
  • Cloud Hosting
  • VPS Hosting
  • Dedicated Hosting
  • Shared Hosting
  • Free Hosting
  • Managed Hosting
  • HTTP

Industry
Partners

industry-partner_ALIBABA
industry-partner_GOOGLEPARTNER
industry-partner_MICROSOFT
industry-partner_REDHAT-r2
industry-partner_ALIBABA
industry-partner_AUTOMATTIC
industry-partner_AWS
industry-partner_DIGITALOCEAN
industry-partner_SCALEWAY
Follow us:
Facebook Twitter Linkedin Youtube Github

COMPANY

About Plesk
Our Brand
Legal
Careers
Impressum

PRODUCT

Pricing 
Extensions
What’s new

KNOWLEDGE BASE

Documentation
Help Center
Migrate to Plesk
Contact Us
Hosting Wiki
Preview releases

PROGRAMS

Contributor Program NEW
Partner Program
Affiliate ProgramNEW

COMMUNITY

Blog
Forums 
Plesk University

First defaul

Company

About Plesk
Our Brand
Legal
Careers
Impressum

PRODUCT

Pricing 
Extensions
What’s new

KNOWLEDGE BASE​

Documentation
Help Center
Migrate to Plesk
Contact Us
Hosting Wiki
Preview releases

PROGRAMS​

Contributor Program NEW
Partner Program
Affiliate ProgramNEW

COMMUNITY​

Blog
Forums
Plesk University

Follow us:
Facebook Twitter Linkedin Youtube Github

© 2025 WebPros International GmbH. All rights reserved. Plesk and the Plesk logo are trademarks of WebPros International GmbH.

Managed with love with Plesk WP Toolkit