Contents
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.phporindex.htmlin the folder, and directory listing is disabled. - Wrong file permissions: a folder set to
700, a file set to000, or files not owned by the account user after a migration. - Deny rules in
.htaccesssuch asRequire all deniedorDeny 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/siteinstead ofpublic_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
- Read the reason in the log: open cPanel, then Metrics → Errors.
Directory index forbiddenmeans a missing index file,client denied by server configurationmeans a deny rule, andModSecuritywith a rule ID means a firewall block. - Check the index file: in Files → File Manager, open
public_htmland make sure the main file sits at the root, not in a subfolder. - Fix permissions: in File Manager select the item and click Permissions. Use
755for folders and644for 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.
- Test
.htaccess: enable “Show Hidden Files” under Settings in File Manager, then rename.htaccessto.htaccess.bak. If the site comes back, a line inside it is the cause. Look forDenyorRequirelines you didn’t intend. - Review cPanel security tools: check Security → IP Blocker for an address blocked by mistake, and Security → Hotlink Protection if only images are refused.
- Disable the security plugin temporarily by renaming its folder in
wp-content/plugins, then test again. - 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
.htaccessbefore 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.