Home › Knowledgebase › KB-1236

Why is my website showing a 403 forbidden error?

Summary

This guide helps you troubleshoot and resolve: Why is my website showing a 403 forbidden error?. Follow the steps below to fix the issue.

Quick Tip: Need immediate assistance? 💻 Open a Ticket

Common Causes

A 403 Forbidden error means your web browser can reach the server, but the server is refusing to allow access to the requested page or directory. This is different from a 404 Not Found error, which means the page does not exist. A 403 error usually points to a permission issue, a security rule blocking access, or a missing index file. This guide covers common checks you can perform across common hosting control panels and content management systems.

DNS propagation issues typically cause connection timeouts or 404 errors, not 403 Forbidden errors. Browser caching can occasionally display a stale error page after the server issue has been fixed, so clearing your cache is still a worthwhile first step.

Quick Fix Steps

  1. Wait one minute, then refresh your browser page to rule out temporary caching.
  2. Clear your browser cache and cookies, then revisit the site.
  3. Try accessing the website from a different network, such as mobile data instead of office Wi-Fi.
  4. Check whether the error occurs on all pages or only specific sections of the website.

Detailed Instructions

Identify Your Web Server Type

The .htaccess file is used by Apache servers only. Nginx servers do not use .htaccess and rely on server-level configuration instead.

  1. Open your website in a browser.
  2. Right-click the page and select Inspect, then open the Network tab.
  3. Refresh the page and click the first request in the list.
  4. Check the Response Headers section for a Server header.
  5. If the header shows Apache, you can use .htaccess rules. If it shows nginx, skip the .htaccess section below and contact support for configuration changes.

Check File and Directory Permissions

Incorrect file permissions are one of the most common causes of a 403 error. The web server needs read access to files and execute access to directories to serve content.

  1. Log in to your hosting control panel and open File Manager, or connect via FTP/SFTP.
  2. Navigate to the public web directory, typically public_html or www.
  3. Right-click a folder and select Change Permissions (cPanel) or Permissions (Plesk File Manager).
  4. Set directories to 755 and files to 644.
  5. Apply the changes and refresh your website to test.
Avoid setting permissions to 777 on files or folders. This allows write access to everyone and is a serious security risk.

Check File Ownership

File ownership determines which system user controls your website files. If ownership is mismatched after a migration, upload, or restore, the web server may be unable to read the files, resulting in a 403 error.

  1. Connect to your hosting account via FTP/SFTP or open File Manager in cPanel or Plesk.
  2. Right-click a file or folder in your website root and select File Owner, Ownership, or Change Owner, depending on your control panel.
  3. Confirm the owner matches the hosting account username or the expected web server user.
  4. If you recently migrated the site or restored from a backup, verify that ownership was not reset to a different user or to root.
  5. Correct any mismatched ownership and refresh your website to test.
If you do not see an ownership option in your control panel, you will need to contact support to check and correct file ownership on the server.

Verify Index Document Configuration

If a directory does not contain a default index file and directory listing is disabled, the server may return a 403 error.

  1. Open File Manager in your hosting control panel.
  2. Check that the root directory contains a file named index.html, index.php, or default.aspx.
  3. If the file is missing, upload a default index file or contact your developer to restore it.
  4. If you recently renamed your homepage, update any internal links or CMS settings to match the new filename.

Review .htaccess Rules (Apache Only)

On Apache-based hosting, the .htaccess file can contain rules that block access to specific IP addresses, user agents, or entire directories.

  1. Open File Manager in cPanel (Files > File Manager) or Plesk (Websites & Domains > File Manager).
  2. Click Settings in cPanel File Manager and ensure Show Hidden Files (dotfiles) is selected. In Plesk, ensure hidden files are visible in the view options.
  3. Locate .htaccess in your website root directory.
  4. Right-click the file and select Download to create a backup copy before making changes.
  5. Look for directives such as Deny from all, Require all denied, or Order deny,allow.
  6. Right-click .htaccess and select Rename. Change the name to .htaccess_backup.
  7. Refresh your website. If the error disappears, the .htaccess rules were the cause.
  8. Restore the backup file and edit the restrictive rules, or contact support for assistance.
Always download a backup of .htaccess before editing. If your site breaks after changes, restore the backup immediately.
If you use a CMS such as WordPress, Joomla, or Drupal, regenerating permalinks often recreates the .htaccess file with default rules.

Check IP-Based Access Blocks

Security plugins, firewalls, or server configurations may block your IP address, especially after multiple failed login attempts.

  1. Visit an IP lookup site to confirm your public IP address.
  2. Log in to your hosting control panel.
  3. In cPanel, open Security > IP Blocker. In Plesk, open Websites & Domains > IP Addresses or check Firewall settings.
  4. Look for your IP address in any deny or block lists.
  5. Remove your IP from the block list if it is listed.
  6. Test the website again from the affected network.

Content Management System Issues

If your website runs on a CMS, a recently installed plugin, theme, or extension may be triggering security rules that produce a 403 error.

  1. Log in to your CMS administration dashboard.
  2. Navigate to Plugins, Extensions, or Modules.
  3. Deactivate any plugins installed or updated shortly before the error began.
  4. Refresh the website frontend to test.
  5. Reactivate plugins one at a time to identify the conflicting extension.
If you cannot access the CMS dashboard due to the 403 error, use File Manager or FTP to rename the plugin folder (for example, /wp-content/plugins/) to disable all plugins temporarily.

Check CDN or WAF Settings (Cloudflare and Others)

If your website uses a content delivery network or web application firewall such as Cloudflare, the 403 error may be generated by the CDN rather than your hosting server.

  1. Log in to your CDN provider dashboard, such as Cloudflare.
  2. Select your domain and navigate to Caching > Configuration.
  3. Click Purge Everything or Purge Cache to clear cached error pages.
  4. Check Security > Events or Firewall rules for blocks triggered against your IP address or country.
  5. Temporarily enable Development Mode in Cloudflare to bypass the cache and test your origin server directly.
  6. If the error disappears in Development Mode, adjust your CDN security settings or contact your CDN provider.

ModSecurity and Server-Level Security Rules

ModSecurity is a web application firewall that runs on some hosting servers. It can block legitimate requests if a rule is triggered, resulting in a 403 error. These rules are managed at the server level and cannot be changed through your control panel.

If you suspect ModSecurity or another server-level firewall is causing the issue, contact support. Provide the time the error occurred and the URL you were trying to access so the team can review the server logs.

When to Contact Support

If you have checked file permissions, file ownership, index files, .htaccess rules, IP blocks, CMS plugins, and CDN settings without resolving the issue, the cause may be server-side configuration, ModSecurity rules, or file ownership problems that require administrative access.

If you host with us, you don't need to do this yourself — just Open a Ticket and our Brisbane team will get it sorted.

Still Having Issues?

Need more help? If the issue persists after trying these steps, please open a support ticket and our team will assist you.

💻 Open a Ticket