# Fixing "Forbidden" Error on cPanel

## Common Causes and Solutions

### 1. File Permissions (Most Common)

**Via cPanel File Manager:**
1. Log into cPanel
2. Go to **File Manager**
3. Navigate to `public_html` folder
4. Right-click on `index.html` → **Change Permissions**
5. Set to **644** (read/write for owner, read for others)
6. Click **Change Permissions**

**Via SSH (if you have access):**
```bash
chmod 644 index.html
chmod 644 *.html
chmod 755 public_html
find public_html -type f -exec chmod 644 {} \;
find public_html -type d -exec chmod 755 {} \;
```

### 2. Directory Permissions

**Via cPanel File Manager:**
1. Right-click on `public_html` folder
2. **Change Permissions** → Set to **755**
3. Apply to all subdirectories

### 3. Check Document Root

1. In cPanel, go to **Domains** or **Subdomains**
2. Verify that your domain points to `public_html` (or `public_html/yourdomain.com`)
3. If using a subdomain, ensure it points to the correct directory

### 4. Verify Index File

1. Ensure `index.html` exists in the root directory (`public_html`)
2. The file should be named exactly `index.html` (case-sensitive on Linux servers)
3. Check that the file is not empty

### 5. Check .htaccess File

The `.htaccess` file has been updated to include `DirectoryIndex` directive.
If issues persist, temporarily rename `.htaccess` to `.htaccess.bak` to test.

### 6. Check Error Logs

1. In cPanel, go to **Errors** or **Error Log**
2. Look for specific error messages that might indicate the problem

### 7. Contact Hosting Support

If none of the above works, contact your hosting provider with:
- The exact error message
- The URL you're trying to access
- What you've already tried

## Quick Checklist

- [ ] `index.html` exists in `public_html`
- [ ] `index.html` permissions are **644**
- [ ] `public_html` directory permissions are **755**
- [ ] `.htaccess` file exists and has `DirectoryIndex` directive
- [ ] Domain/subdomain points to correct directory
- [ ] No syntax errors in `.htaccess` file
