cPanel Hosting Guide: Understand HTTP Error 403 and How to Fix It

cPanel Hosting Guide: Understand HTTP Error 403 and How to Fix It

Table of Contents

  1. Service Direction / Introduction / Scope
  2. Service Transparency
  3. Definitions
  4. What Does HTTP Error 403 Mean
  5. Most Common Causes on cPanel Hosting
  6. Step by Step Troubleshooting
  7. Common Mistakes
  8. FAQ
  9. Use Case
  10. Summary

Service Direction / Introduction / Scope

This article explains what HTTP Error 403 means on cPanel hosting and provides practical troubleshooting steps to identify and fix the cause. HTTP 403 usually relates to access permission, access rules, or security restrictions that prevent a visitor from viewing a page.

This guide applies to common PHP websites such as WordPress, Joomla, and custom PHP sites hosted on cPanel.

Service Transparency

HTTP 403 is a web server response that means the request was understood, but access is not allowed. In many cases, the server is working normally, but a rule or permission setting is blocking the request.

On shared hosting, HTTP 403 is commonly caused by incorrect file permissions, missing index file, restrictive .htaccess rules, hotlink protection, WAF or security plugin blocks, or IP and country based restrictions.

Some 403 blocks are intentional for security. If you recently changed security settings, firewall rules, or installed a security plugin, reverse the latest change first.

Definitions

HTTP 403 means Forbidden. The server refuses to serve the requested resource.

File permissions control who can read, write, or execute a file or folder on the server.

.htaccess is a configuration file that can allow or block access using Apache rules.

Index file is the default file a directory loads, commonly index.php or index.html.

WAF means Web Application Firewall, which blocks requests that look risky.

What Does HTTP Error 403 Mean

HTTP Error 403 means the server can be reached, but it refuses to allow access to the requested page, file, or folder. This can happen for visitors, or sometimes only for specific locations, IP addresses, or specific URLs.

Typical symptoms include the following items.

  • 403 Forbidden when opening the homepage
  • 403 Forbidden only on a specific folder or file
  • 403 Forbidden only when uploading or accessing wp-admin
  • 403 Forbidden only for certain IP or country

Most Common Causes on cPanel Hosting

  • Wrong file permissions such as folder set too strict or file set incorrectly
  • Wrong folder permissions on public_html or on a specific website directory
  • Missing index.php or index.html in the folder and directory listing is disabled
  • .htaccess rules blocking access such as deny from all, require all denied, or bad rewrite rules
  • Security plugin or WAF block due to suspicious request patterns
  • Hotlink protection blocking file access when the referrer is not allowed
  • IP or country restriction configured in a security tool, Cloudflare, or within .htaccess
  • Ownership mismatch after migration, files owned by wrong user can trigger access denial

Step by Step Troubleshooting

Step 1: Confirm the scope

  • Does 403 happen on the whole domain, or only one folder
  • Does it happen for everyone, or only certain IP or country
  • Did it happen after an update, migration, or security setting change

Step 2: Check if index file exists

In cPanel File Manager, go to public_html and confirm you have index.php or index.html. If there is no index file, the server will usually return 403 because directory listing is disabled.

Step 3: Check folder and file permissions

Recommended typical permissions on shared hosting.

  • Folders: 755
  • Files: 644

In cPanel File Manager, right click the affected folder or file, select Change Permissions, and apply the correct values.

Step 4: Temporarily test .htaccess

In the affected folder, locate the .htaccess file. Rename it to .htaccess.bak and test the website again.

If the website loads after renaming, the issue is caused by a rule inside .htaccess. You can restore a clean default .htaccess based on your CMS or revert your latest changes.

Step 5: Check Hotlink Protection

In cPanel, search for Hotlink Protection. If enabled, confirm your domain is listed correctly and file types are not incorrectly blocked.

Step 6: Check security plugin or WAF logs

If you use WordPress security plugins or firewall features, review the blocked requests log. Disable the security rule temporarily to confirm if it is the cause, then whitelist the correct URL or IP.

Step 7: Review Error Log

In cPanel, open Errors and check recent entries. Many 403 events will show the exact reason, such as permission denied, client denied by server configuration, or rewrite rule violation.

Step 8: If the issue persists

Send iCoreHosting support the affected URL, the time it happened, and any relevant screenshots or Error Log entries. This helps confirm whether the block is from server security policy or website configuration.

Common Mistakes

  • Setting permissions to 777, which creates security risk and may still be blocked by server security rules
  • Deleting .htaccess instead of renaming for testing, causing loss of important rewrite rules
  • Assuming 403 means the server is down, when it is usually an access rule issue
  • Enabling hotlink protection but forgetting to include the correct domain variations
  • Blocking admin access by adding deny rules in .htaccess without a backup plan

FAQ

1. Why do I get 403 only on one folder

That folder may have different permissions, a special .htaccess rule, or it may not contain an index file. Check permissions and .htaccess inside that folder.

2. Why do I get 403 only on wp-admin or administrator

This is often caused by security plugins, WAF rules, or IP restrictions. Review security logs and check .htaccess deny rules.

3. Why do I get 403 after migration

After migration, file ownership or permissions may be incorrect. Fix folder to 755 and files to 644, and ensure the files belong to the correct cPanel user.

4. I renamed .htaccess and the site works, what should I do next

Restore a clean .htaccess for your CMS, then reapply required rules carefully. If you use WordPress or Joomla, regenerate permalinks or rewrite rules from the admin panel.

5. Can display_errors help for 403

No. display_errors is for PHP errors and usually helps with 500 errors. HTTP 403 is typically access rules or permission related, so you should check .htaccess and server logs instead.

Use Case

Scenario: A customer reports the website homepage shows 403 Forbidden right after a security hardening change.

Action: Customer checks public_html and finds a deny rule inside .htaccess. They rename .htaccess to test and confirm the website loads normally.

Result: Customer restores a clean .htaccess and removes the blocking rule. Website becomes accessible again.

Final step: Customer reviews security settings to ensure protection remains enabled without blocking legitimate visitors.

Summary

HTTP Error 403 means access is forbidden even though the server is reachable. On cPanel hosting, the most common causes are file permissions, missing index files, and .htaccess rules that block access. Troubleshoot by checking index files, setting folders to 755 and files to 644, testing .htaccess by renaming, and reviewing Error Logs. Once the blocking rule is removed or corrected, the website should load normally.

  • 0 användare blev hjälpta av detta svar
Hjälpte svaret dig?

Relaterade artiklar

How to Obtain cPanel Login Information from Your Current Hosting Provider for Transfer to iCoreHosting

How to Obtain cPanel Login Information from Your Current Hosting Provider for Transfer to...

How to Reset Your Email Login Password via cPanel

If you've forgotten your email login password or need to reset it for security reasons, you can...

How to Log into cPanel Through iCore Hosting Billing Portal

How to Log into cPanel Through the iCore Hosting Billing Portal Table of Contents Service...

How to Connect Outlook Email for the cPanel Control Panel at iCoreHosting

How to Connect Outlook Email for the cPanel Control Panel at iCoreHosting This guide provides...

How to Create a MySQL Database in cPanel

Creating a MySQL database in cPanel is a straightforward process. Follow these steps to set up a...