403 Forbidden Error — Causes and Fixes
A 403 error means the server understands the request but refuses to fulfill it.
Common Causes
1. Wrong File Permissions
The most common cause.
Fix:
# Directories should be 755
find ~/public_html -type d -exec chmod 755 {} \;
# Files should be 644
find ~/public_html -type f -exec chmod 644 {} \;
2. Missing index.html / index.php
If your directory has no index file, the server returns 403 (or lists files if directory listing is on).
Fix: Ensure public_html/ contains an index.php or index.html.
3. .htaccess Deny Rule
Check if .htaccess contains a Deny from all rule affecting your IP or directory.
Fix: Review and remove or adjust the deny rule.
4. IP Blocked by ModSecurity
Our WAF may have blocked your IP after suspicious activity.
Fix: Contact support with your IP address to whitelist it.
5. Hotlink Protection
If you're accessing an image from another site and getting 403, hotlink protection may be enabled.
Fix (disable hotlink protection in .htaccess):
<IfModule mod_rewrite.c>
RewriteEngine Off
</IfModule>