+1-855-211-0932 (ID:287497)
Don't have an account yet? Sign up now!

HomeArticlesHow to Set Up Custom Error Pages for My Website

How to Set Up Custom Error Pages for My Website

How to Set Up Custom Error Pages for My Website

How to Set Up Custom Error Pages for My Website

Category: Tools & Settings

Understanding Custom Error Pages

When an error occurs on your server, it typically displays a generic error page that doesn’t match your website’s layout. Custom error pages can enhance the user experience by providing relevant information and maintaining your site’s branding.

Methods to Set Up Custom Error Pages

There are two primary methods to set up custom error pages:

1) Using the Subdomain Manager

This method is simple and effective for setting custom error pages for server errors 400, 401, 403, and 404:

  1. Go to My Domains > Hosted Domains in your Web Hosting Control Panel.
  2. Locate your domain and click on the Edit Domain icon from the Actions column.
  3. You will find fields to set custom error pages for:
    • Error 400 page:
    • Error 401 page:
    • Error 403 page:
    • Error 404 page:
  4. Initially, these fields are set to "Default". To customize, select "Custom URL" and enter the path to your custom error page.
  5. If you haven’t created the error pages yet, do so before returning to update these settings.

2) Using .htaccess

Alternatively, you can set up custom error pages by editing your .htaccess file:

  1. First, create your custom error page(s).
  2. Access the File Manager in your Hosting Control Panel and navigate to your domain/subdomain folder (typically located inside the www/ directory).
  3. Create a new file named .htaccess if it doesn’t exist.
  4. Edit the .htaccess file and insert the following lines:
ErrorDocument 400 /custom400.html
ErrorDocument 401 /custom401.html
ErrorDocument 403 /custom403.html
ErrorDocument 404 /custom404.html
            

Ensure that the paths and names correspond to the actual locations of your custom error pages. This method overrides any settings in the Subdomain Manager and works universally.



Tags: , , , , , ,

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>