cPanel & Hosting How-Tos How to Fix a 403 Forbidden Error on Your Website
A 403 Forbidden error means the server understood the request but is refusing access to that page or folder. It’s a permissions or access-rule problem, and almost always something you can fix yourself.
What causes a 403
- Wrong file or folder permissions — the most common cause.
- A missing index file — opening a folder with no
index.html/index.phpwhen directory browsing is off. - A blocking
.htaccessrule — aDeny/Requirerule, a hotlink-protection rule, or a bad redirect. - Your IP address is blocked — by a security plugin, firewall or an
.htaccessdeny rule. - An empty or misconfigured
public_html— nothing to serve at the root.
How to fix it
1. Fix file and folder permissions
In cPanel File Manager, select the file or folder, click Permissions, and set:
- Folders → 755
- Files → 644
Never use 777 — it’s insecure and often rejected. For the full guide, see fix file and folder permissions in cPanel.
2. Check for a missing index file
A folder with no index.html or index.php returns 403 when directory browsing is disabled (the normal, secure setting). Either upload an index file or, if it’s your site root, make sure your site’s files are in public_html.
3. Review your .htaccess file
In File Manager (show hidden files), open .htaccess in public_html. Temporarily rename it to .htaccess_old and reload your site:
- Error gone? A rule in it caused the 403 — restore it and remove the offending line (often a bad
Deny from, hotlink rule, or redirect). See .htaccess explained. - Still 403? Rename it back; the cause is elsewhere.
On WordPress, regenerate a clean .htaccess via Settings → Permalinks → Save Changes.
4. Check you’re not IP-blocked
If only you get the 403, your IP may be blocked after failed logins or by a security plugin. Check the plugin’s block list, or ask us to check the server firewall. A changing mobile/office IP is a common trigger.
5. Look for a WordPress security plugin
Security and firewall plugins (Wordfence, etc.) can throw 403s on wp-admin or specific URLs. Review the plugin’s firewall log and whitelist yourself if needed.
Still stuck?
Your error logs will name the exact file or rule causing the block, and our site-down troubleshooting guide covers the broader checks.
Every Web Hosting, WordPress Hosting and Reseller Hosting plan at Genhost gives you File Manager and error logs to fix 403s yourself. If an IP block or firewall rule is involved, our support team can check the server side for you.
Frequently asked questions
What does a 403 Forbidden error mean?
It means the server understood the request but refuses to let you access that page or folder. The usual causes are wrong file or folder permissions, a missing index file, a blocking .htaccess rule, or your IP being blocked.
What permissions should my files have?
On most shared hosting, folders should be 755 and files 644. Never set anything to 777 — it's a security risk and some servers reject it. You can fix permissions in cPanel's File Manager.
Why do I get 403 on a whole folder?
Usually there's no index file (index.html or index.php) in it and directory browsing is turned off, or an .htaccess rule denies access. Add an index file or adjust the rule.