About the '403 Forbidden' error message
A 403 Forbidden error occurs when a web server denies access to a requested resource. On ruachost.com, this typically means that permissions or configuration settings are preventing visitors from viewing a file or directory.
Common Causes of 403 Errors
Section titled “Common Causes of 403 Errors”- Missing index file: No
index.htmlorindex.phpexists in the directory. - Incorrect file permissions: The
.htaccessfile orpublic_htmldirectory has restrictive permissions. - Directory permissions misconfigured: The directory may be set to
644instead of755. - Access restrictions in
.htaccess: Rules may block visitors from certain files or directories. - IP or country blocking: Access may be restricted based on visitor location.
How to Resolve a 403 Error
Section titled “How to Resolve a 403 Error”Step 1: Check for an Index File
Section titled “Step 1: Check for an Index File”Ensure your site’s root directory contains an index file:
index.htmlindex.php
Without one, Apache will deny access.
Step 2: Verify File Permissions
Section titled “Step 2: Verify File Permissions”-
.htaccessshould be set to:Terminal window chmod 644 ~/public_html/.htaccess -
public_htmldirectory should be set to:Terminal window chmod 755 ~/public_html
Step 3: Review .htaccess Rules
Section titled “Step 3: Review .htaccess Rules”- Look for
Deny from allor restrictive rules. - Remove or adjust them if they block legitimate visitors.
Step 4: Check Server Logs
Section titled “Step 4: Check Server Logs”- Use cPanel → Metrics → Errors or SSH to view Apache error logs.
- Logs will show the exact reason for the 403 error.
Step 5: Test Access
Section titled “Step 5: Test Access”- Clear browser cache and cookies.
- Retry accessing the site.
- If using a CDN (like Cloudflare), purge cache there as well.