How to customize an "Error Pages"?

Common errors and their names:

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


Now Let us see how to custom an error page:

1. Login to cPanel.

2. In the Advanced section, click on Error Pages.

3. Select domain to manage error pages.

4. Choose from the list of common Error Codes (400 (Bad request), 401 (Authorization required), 403 (Forbidden), 404 (Not found) or 500 (Internal server error). For additional codes, please select Show All HTTP Error Status Codes.

5. On the editor page, you should insert HTML or SHTML code.

If you don’t know HTML code, please go to your browser, from the View select Source/Page Source and copy the text from the pop-up window. Now, you have the code.

6. When you are ready, click the Save button.

Common problems

If you see the error page still, refresh the page (Ctrl + F5). If the problem has existed, then go to .htaccess file and write the following text in the public_html directory:

ErrorDocument 403 /403.shtml
ErrorDocument 404 /404.shtml
ErrorDocument 500 /500.shtml

If you don't want site’s visitors to see 404 errors, you can add code like this:

ErrorDocument 404 /index.html

Note: Some browsers like Internet Explorer doesn’t display error pages if the page is less than 1 kilobyte.
Was this answer helpful? 0 Users Found This Useful (0 Votes)