How to Fix HTTP 403 Forbidden Error

79 views
Short answer: Reset directory permissions to 755 and file permissions to 644, ensure an index.php file resides in public_html, and remove accidental Deny IP rules from .htaccess.

Fix access denied errors caused by missing directory index files, file permission restrictions, .htaccess Deny rules, or Imunify360 WAF blocks.

Before you start: Back up your site files and database and download the backup to your own computer. How to take a full backup

Quick reference

Common Causes 1. Missing index.php / index.html | 2. Folder permissions wrong (e.g. 700) | 3. Imunify360 WAF rule triggered
Required Permissions Folders: 755 | Files: 644
Security WAF Imunify360 Proactive Defense

Quick diagnosis

Scenario & Suspected Cause Immediate Action & Remedy
Incorrect file or directory permissions Reset directories to 755 and files to 644 inside cPanel File Manager.
Missing directory index document Ensure an index.php or index.html file exists inside the public_html root.
Request blocked by ModSecurity WAF rules Inspect Imunify360 incident logs in cPanel and contact support to whitelist false-positives.
Deny directive in .htaccess file Inspect .htaccess rules and remove accidental IP blocking or rewrite restrictions.

Steps

  1. Verify Index File: Ensure your directory contains an index.php or index.html file. If directory indexing is disabled and no index file exists, the server returns 403 Forbidden.
  2. Verify File & Folder Permissions: Ensure folders are 0755 and files are 0644. If a folder is set to 0700, web visitors are blocked.
  3. Check .htaccess for Deny Directives: Inspect .htaccess for lines such as Deny from all or IP bans that may inadvertently block legitimate requests.
  4. Check Imunify360 Blocks: If a specific POST request or theme setting triggers 403, Imunify360 WAF may have flagged the request as suspicious. Solve the on-screen CAPTCHA or contact support to whitelist the rule.

Troubleshooting and tips

  • 403 on wp-admin: Security plugins often restrict /wp-admin to specific IP addresses. Check security plugin settings or rename the plugin folder temporarily in File Manager.
Need more help? If you run into an error while following these steps, open a ticket with technical support and our team will look into it. Open a ticket
Was this article helpful?
No, I need more help
Didn't find your answer?
Under 3 minutes
Submit Support Ticket