The HTTP error 403 - Forbidden means that access to the file or folder you are trying to open has been denied, either on purpose or due to a misconfiguration.
The Error Log in cPanel can help you in troubleshooting such problems. It is a list of the latest error messages generated by your website. In this list you will find information about each error including:
- The date and time of the error.
- Description of the error.
- Information about which folder or file is possibly generating the error.
Here are some examples of the most common problems that can produce a 403 Forbidden error:
The error above may be logged when your IP is blocked by a rule in the website's .htaccess file. To resolve the problem, you need to open that file and look for lines like:
deny from 18.104.22.168
This rule denies access from a particular IP. In case you see your own IP address there instead of 22.214.171.124, this would mean you are blocked.
There are multiple ways to find your IP address. Perhaps the most convenient one is an online tool such as this one
deny from all
This rule denies access from all IPs.
When the line is deleted from the file, you should be able to access the website again. To edit the .htaccess file you can use the File Manager tool in your cPanel.
Each website has a main file called an index file that can be named index.php, index.html, etc, depending on the programming language used for making your website.
That file is used to serve the front end content of your website to its visitors.
On Indsoft System's servers, if a visitor tries to access a folder on your account without an index file (or without any website content), this would end in a 403 Forbidden error.
This would mean that your website was either never uploaded in the correct folder on your hosting account, or that your site's index file (and potentially other files) have been removed.
In the first situation you would just need to upload the site's content in the correct directory.
This would be the public_html for your main website. If you have addon sites, you can get to choose their root folder, and can edit it in cPanel -> Addon Domains.
If your site's files are missing, restoring would be the only option. Indsoft System's backs up shared and Cloud hosting accounts daily.
More information on our backup solutions is available here.
Error messages likes this are logged when the permissions of the file or folder you are trying to access are too restrictive.
In order to resolve the problem you need to modify the permissions of the files to 644 and for the folders to 755.
You can modify the files and folders permissions via SSH, FTP, or using the File Manager tool in cPanel.