An error page informs a visitor when there is a problem accessing your site. Each type of problem has its own code. For example, a visitor who enters a nonexistent URL will see a 404 error, while an unauthorized user trying to access a restricted area of your site will see a 401 error.
Basic error pages are automatically provided by the web server (Apache). However, if you prefer, you can create a custom error page for any valid HTTP status code beginning in 4 or 5.
To create your custom error page, follow the steps below:
Step 1. Log in to the cPanel using this link format: http://yourdomain.com/cpanel/
Replace yourdomain.com with the Main Domain Name connected to your hosting.
Step 2. Click Error Pages under Advanced panel.
Step 3. Choose the domain name you want to apply the error page.
Step 4. Choose which error page you’d like to edit. You can choose from the suggested common error pages. You can check the full list under Show All HTTP Error Status Codes.
Step 5. Type/copy HTML code in the space provided.
<p>insert custom error message here</p>
Step 6. Click Save once done.
A different take is creating a custom error page using .htaccess file. Here’s how you can do it:
1. Open Notepad or any word editor.
2. Use the sample codes below, save as ‘.htaccess’ and upload into the directory where the domain name is currently pointed.
Or if you already have a .htaccess file being used by the website, you may use the codes below:
|ErrorDocument 400 /bad_request.html
ErrorDocument 401 /authorization_required.html
ErrorDocument 402 /payment_required.html
ErrorDocument 403 /forbidden.html
ErrorDocument 404 /not_found.html
ErrorDocument 405 /method_not_allowed.html
ErrorDocument 406 /not_acceptable.html
You can add more of the custom error pages or just use the most common ones – depends on your needs. Please make sure that all files are uploaded in the correct directory.