When you see “403 Forbidden” when trying to access your website, use the following guide to correct it.
Quick Steps:
- 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 causes of 403 Forbidden Errors
#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 its 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 for causing 403 forbidden errors are the .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
If 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 must use the PHP Version Selector.
The most common location (there may be multiple .htaccess files on your account) that we find to have these rules is in the /home/ directory, which is one directory above your public_html directory.
#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 with the values shown below, they will need to be changed. If you’re not familiar with doing this, you can always contact our support department.
- Files: CHMOD 644 permission
- Directories: CHMOD 755 permission
Conclusion
We hope you have got an idea of what all things to look for when you encounter a 403 Forbidden error.
If you have any web hosting questions please feel free to reach out to us. We're happy to help.
Shared Hosting | Reseller Hosting | Managed WordPress Hosting | Fully Managed VPS Hosting
Our Guiding Principles
- Provide consistent, stable, and reliable web hosting services.
- Ensure rapid ticket response and quick resolutions to issues.
- Never saturate or over-provision servers to ensure stability and speed for our customers.
- Use only high-quality enterprise-class hardware to ensure minimal downtime from hardware failures.
- Provide clear pricing with no hidden fees or gotchas.