How to fix the 403 Forbidden error on your website
A "403 Forbidden" error means the server understood the request but refused to show the page. On cPanel hosting the cause is almost always one of a few things: wrong file permissions, a rule in .htaccess, a missing index file, or a security rule that blocked your request. This guide helps you fix the 403 Forbidden error by checking each cause in order.
Step 1: Find out who is blocked
- Open the site from your phone using mobile data (not Wi‑Fi). If it works there, your own IP address is probably blocked by a firewall or by IP Blocker.
- If the error appears for everyone and on every page, the cause is on the site (permissions,
.htaccessor index file). - If only one page or action fails (for example saving a post), a security rule such as ModSecurity is the likely cause.
Step 2: Check the error log
In cPanel open Metrics > Errors. It shows the latest error lines for your sites. Messages like "client denied by server configuration", "Permission denied" or "ModSecurity: Access denied" tell you exactly where to look.
Step 3: Fix file and folder permissions
The correct permissions on cPanel hosting are:
- Folders: 755
- Files: 644
- Sensitive config files such as
wp-config.php: 640 or 600 are also fine
Never use 777. It does not fix 403 errors and it is a serious security risk. In File Manager, select a file or folder, click Permissions and set the right value. If you have SSH access, you can fix everything inside public_html at once:
cd ~/public_html
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
public_html (such as mail and SSH files) need different permissions. If you are not sure, ask support to fix the permissions for you.Step 4: Check the .htaccess file
- In File Manager, open
public_htmland click Settings > Show Hidden Files (dotfiles). - Download a copy of
.htaccessas a backup. - Look for lines such as
Deny from all,Require all deniedorOrder deny,allowthat block access. - To test, rename
.htaccessto.htaccess-oldand reload the site. If the 403 disappears, the problem is inside that file.
For WordPress you can create a clean file by going to Settings > Permalinks in the dashboard and clicking Save Changes. The default WordPress rules are:
# BEGIN WordPress
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
Step 5: Make sure there is an index file
If a folder has no index.php or index.html and directory listing is disabled, the server returns 403. Upload your site files to the right place; see How to upload your website (File Manager and FTP). Also check that the domain points to the right document root in Domains.
Step 6: Check security tools
- IP Blocker: in cPanel, open IP Blocker and remove any address or range you did not mean to block.
- Hotlink Protection: if it is on and your domain is missing from the allowed list, images may return 403.
- ModSecurity and the server firewall: if a single action is blocked or your IP is blocked, send support your public IP address and the time of the error, and we will check the logs.
- Security plugins (WordPress) may block countries or IPs. Disable them temporarily to test.
Frequently asked questions
What is the difference between 403 and 404?
404 means the page does not exist. 403 means it exists but access is refused.
The site works for others but shows 403 for me. Why?
Your IP was likely blocked, often after several wrong passwords for cPanel, email or FTP. Contact support with your IP and we will unblock it.
Can a 403 be caused by Cloudflare?
Yes. If the 403 page shows the Cloudflare logo, check the firewall or security rules in your Cloudflare dashboard.