Skip to content
HTTP status codes3 min read

403 Forbidden: why the server won't show the page

403 Forbidden

Short answer

A 403 Forbidden error means the server understood the request but refuses to fulfil it because you're not allowed to access that file or folder. On hosting accounts it is usually caused by wrong file permissions, a missing index file, a deny rule in .htaccess, or a firewall block.

ArabyHost teamLast updated: ShareWhatsAppXLinkedIn
Contents
  1. What causes a 403 error
  2. Fixing it as a visitor
  3. Fixing it as the site owner
  4. Prevention
  5. On ArabyHost

When a server answers 403, it knows the file or folder exists but has decided not to serve it to you. The message may read 403 Forbidden or You don't have permission to access this resource. Unlike a 401 error, logging in won’t help, because the refusal comes from server or site settings.

What causes a 403 error

  • No index file: there’s no index.php or index.html in the folder, and directory listing is disabled.
  • Wrong file permissions: a folder set to 700, a file set to 000, or files not owned by the account user after a migration.
  • Deny rules in .htaccess such as Require all denied or Deny from all, or blocked IP addresses.
  • A web application firewall (WAF): a ModSecurity or Imunify360 rule flagged the request as an attack. See ModSecurity 403.
  • WordPress security plugins that block countries, IPs, or paths like wp-admin.
  • Hotlink Protection stopping images from loading on other sites.
  • Files in the wrong folder: the site was uploaded into public_html/site instead of public_html.

Fixing it as a visitor

Your IP address may be blocked. Try another network (mobile data, for example) or turn off your VPN and retry. If it still fails, contact the site owner with the URL and the time you saw the error.

Fixing it as the site owner

  1. Read the reason in the log: open cPanel, then Metrics → Errors. Directory index forbidden means a missing index file, client denied by server configuration means a deny rule, and ModSecurity with a rule ID means a firewall block.
  2. Check the index file: in Files → File Manager, open public_html and make sure the main file sits at the root, not in a subfolder.
  3. Fix permissions: in File Manager select the item and click Permissions. Use 755 for folders and 644 for files. If your plan includes SSH:
find ~/public_html -type d -exec chmod 755 {} \;
find ~/public_html -type f -exec chmod 644 {} \;

The chmod calculator helps you work out other values.

  1. Test .htaccess: enable “Show Hidden Files” under Settings in File Manager, then rename .htaccess to .htaccess.bak. If the site comes back, a line inside it is the cause. Look for Deny or Require lines you didn’t intend.
  2. Review cPanel security tools: check Security → IP Blocker for an address blocked by mistake, and Security → Hotlink Protection if only images are refused.
  3. Disable the security plugin temporarily by renaming its folder in wp-content/plugins, then test again.
  4. If ModSecurity or Imunify360 blocked it, don’t try to switch protection off. Send support the URL and time so they can review the rule.

Prevention

  • Never use 777; stick to standard permissions when uploading.
  • Keep a copy of .htaccess before every edit.
  • When installing a security plugin, allowlist your own IP before turning on blocking.

On ArabyHost

Every account is isolated in CloudLinux CageFS, sites run on LiteSpeed (which reads .htaccess like Apache), and Imunify360 filters malicious traffic. If a 403 comes from a ModSecurity or Imunify360 rule, support can review and adjust the block. Before that, you can ask the Araby AI assistant to read your error log and tell you which kind of block you’re hitting.

FAQ

What are the correct file permissions for a website?

On cPanel hosting the usual rule is 755 for folders and 644 for files, with 600 or 640 for sensitive config files like wp-config.php. Avoid 777: it's a security risk and can cause errors.

Why do I get 403 on the homepage right after uploading my site?

Most likely there's no index.html or index.php in public_html, or you uploaded the files into a subfolder. The server won't list folder contents, so it answers 403.

Can a firewall cause a 403 error?

Yes. ModSecurity or Imunify360 rules can block a request that looks suspicious, such as a form containing code. In that case support should review the block rather than you disabling protection.

Useful? Share it with someone who needs it:WhatsAppXLinkedIn

Read next

Ready to put your idea online?

Fast, isolated hosting, support that understands you, and an AI assistant that fixes problems with you.