This tutorial will explain how to create a custom error page for your website in cPanel. Your website visitors can see an error page whenever an error has occurred while browsing your site. Apart from the general error pages, with custom error pages you can change the predefined error pages and add a custom message to it.
Step 1. Login to cPanel and select Error Pages from Advanced Section.
Step 2. Select the domain.
Step 2. Select the error page from the lists you want to customize.
Step 3. Type the code you want to add in the error pages. You can also select from the buttons at the top of the page.
Login to your cPanel account and select Error Pages from the Advanced Section.
cPanel Advanced Panel: Error Pages
From the new page select the domain where you wish to display the error page. In the next step, from the lists, select the error page which you need to customize.
Error Pages in cPanel
After selecting the error page from the lists, you can add the codes which need to be displayed in the error page. Also, there are buttons at the top of the page from which you can select according to the content you need to add in the error page.
Learn how to set up a custom WordPress 404 error page by following the tutorial How to Create a Custom WordPress 404 Error Page
When you see “403 Forbidden” when trying to access your website use the following guide to correct it.
- Check for incorrect .htaccess rules.
- Check for improper file access permissions.
- Check to see if you have selected an incorrect version of PHP in cPanel.
If you see a 403 Forbidden error on your website there are a few areas we can look to find the source of the problem. We’ll outline a few scenarios that would cause this and how to resolve them.
Possible cause #1: .htaccess rules
The most typical reason for a 403 Forbidden error is due to .htacess rules on your website. You’ll want to check your .htaccess rules to ensure they are correct & not causing a conflict.
View and edit the .htaccess file for your website through the cPanel control panel by following these steps.
- Open cPanel
- Search for and open File Manager
- Right-click on the .htaccess file in the right-side pane and choose Edit (reference image below)
Note: Firefox has an issue where it’s own right-click menu will appear over the File Manager’s right-click menu. To overcome this press Escape after right-clicking on the .htaccess file to see the File Manager right-click menu.
The number one cause is due to .htaccess rules that attempt to force a specific PHP version. You may see some rules in your .htaccess file that look similar to the code below:
AddHandler application/x-httpd-php52 .php .php5 .php4 .php3
In the event you have rules similar to the one shown above, these will need to be removed as they will not work on our servers. To change the PHP version on your hosting account with VeeroTech, you will need to use the PHP Version Selector.
The most common location (there may be multiple .htaccess files on your account) that we find have these rules is located in the /home/ directory, which is one directory above your public_html directory.
Possible Cause #2: File & directory permissions
Files & directories that do not have the correct permissions can also cause a 403 Forbidden error. If you see files and directories that are not set to the values shown below, they will need to changed. If you’re not familiar with how to do this, you can always contact our support department.
- Files: CHMOD 644 permission
- Directories: CHMOD 755 permission