How to Create Custom Error Pages

How to Create Custom Error Pages

Error pages help inform visitors that there’s an issue with the webpage they’re trying to reach. A code number usually represents every error. For example, when a visitor is entering a nonexistent URL, they will get a 404 error. While unauthorized visitors accessing your website’s restricted area will see a 401 error.

Your web server software usually takes care of basic error pages. In this tutorial, you’ll learn how to create a custom one using the cPanel, to show HTTP status codes from 400 to 510.

Step 1. Locate and Enter the Error Pages

The Error Pages tool is located under the Advanced section. Find and open it.

error pages tool in cpanelStep 2. Select an Error Page for Editing

Once it is opened, you can do the following:

  • Managing — here you can select the domain that will use the error page
  • Error Code List — you need to select the proper error page to make. By default, cPanel only shows the five most common error pages. If you want to see the remaining list, click the Show All HTTP Error Status Codes tab

the most common error code list

Step 3. Edit the Error Page

Once you choose which code to work with, you’ll be directed to the editing screen. Here you can use HTML code and insert some tags.

  • Referring URL — shows the URL that visitors come from
  • Visitor’s IP Address — shows the visitors’ IP
  • Requested URL — shows the URL that visitors are trying to access
  • Server Name — shows the server name
  • Visitor’s Browser — shows the browser type the visitor uses
  • Redirect Status Code — shows the error code

editing the page for the chosen status code

You can experiment with the variables to create a better custom error page. In the example, we’re trying to retain visitors by giving them a link to our homepage. Once you’re satisfied with the result, click Save.

You can simulate how the error page looks by simply entering a non-existing URL, such as to your browser.

It’s a good thing to have custom error pages, as not all visitors understand status codes. It’s also an effective way to retain visitors on your website, by offering them a chance to navigate to a URL that actually exists.

  • cpanel, error pages, custom error, 404, 401
  • 0 Пользователи нашли это полезным
Помог ли вам данный ответ?

Связанные статьи

Access to the Control Panel (cPanel)

cPanel is a web hosting account management toolYou only get one username per cPanel. If you...

Access to the Easy Web Site Builder

To access to the Easy Web Site Builder that contains over 1000 ready-to-use templates are now...

How to Check Bandwidth

Step 1. Access a Short Summary of Bandwidth Usage When you log in, you can immediately see the...

Creating a Subdomain

How to Create a Subdomain Log into cPanel. In the Domains section, click on the Subdomains...

How to Configure Dreamweaver for FTP

How to Configure Dreamweaver for FTP If you are using Dreamweaver as your site designer, you...