You type in your website address and instead of your homepage you get a blunt message: "403 Forbidden. You don't have permission to access this resource." It's confusing, especially when it's your own site. You own it, after all.
The thing to understand is that a 403 isn't about who owns the site. It means the web server received the request, understood it and deliberately refused to serve it. Something in the server's rules, file permissions or security settings said no. Your job is to find out which one.
What a 403 Forbidden error means
The 403 status code means access is denied. It's different from a few similar errors:
- 401 Unauthorized means you need to log in, and the server will accept credentials.
- 403 Forbidden means the server won't serve this, even if you were logged in.
- 404 Not Found means the server can't find anything at that address.
You might see it as "403 Forbidden," "Access Denied," "HTTP Error 403," "Forbidden: You don't have permission to access / on this server," or a security-branded block page.
Quick checks for visitors
If you're just visiting a site, try these:
- Double-check the URL. A typo that points to a folder instead of a page can trigger a 403.
- Clear your browser's cache and cookies for the site, or try a private window.
- Disconnect from a VPN. Some sites block traffic from certain networks or countries.
- Try a different network, such as mobile data, in case your IP address has been blocked.
If none of that helps, the block is on the site's side.
Common causes and fixes for site owners
1. Wrong file or folder permissions
This is the most frequent cause. Linux servers use permissions to decide who can read, write and execute files. If a file or folder is too restrictive, the web server can't read it and responds with 403.
Standard permissions for most websites are:
- Folders: 755
- Files: 644
To check them, open your control panel's File Manager or an SFTP client, right-click a file or folder and look at its permissions. Pay special attention to:
- Your site's root folder, usually
public_html - The
index.phporindex.htmlfile - Any folder you recently uploaded or extracted
On a VPS with SSH access, you can reset a site's permissions with:
find /path/to/site -type d -exec chmod 755 {} \;
find /path/to/site -type f -exec chmod 644 {} \;
Avoid 777. It's unsafe and on many servers it causes errors rather than fixing them.
2. Incorrect file ownership
On a VPS or after a migration, files can end up owned by the wrong user, for example root instead of the user the web server runs as. Even with correct permissions, the server may be unable to read them. Fix ownership with chown, using the correct user and group for your setup.
3. A bad or overly strict .htaccess file
On Apache and LiteSpeed, .htaccess can contain rules that deny access, like Deny from all or Require all denied. Security plugins, hotlink protection and IP blocking features also write rules here. One wrong line can lock everyone out, including you.
To test:
- Rename
.htaccessto.htaccess-backup. - Reload the site.
- If it works, the problem is in that file. Restore the default rules for your platform and add custom rules back one by one.
For WordPress, saving your settings under Settings, then Permalinks, regenerates the standard rules. Our guide on fixing a broken .htaccess file in WordPress shows the default content.
Also look for .htaccess files in subfolders, which can block specific directories like wp-content/uploads.
4. No index file in the folder
When someone visits a folder, the server looks for a default file such as index.php or index.html. If there isn't one, and directory listing is turned off (which it should be, for security), the server returns 403.
This often happens when:
- Files were uploaded to the wrong folder, such as a subfolder inside
public_html - The index file was renamed or deleted
- A new site hasn't been uploaded yet
Make sure your main index file sits directly in the document root for your domain.
5. Security rules and firewalls
Web application firewalls such as ModSecurity, security plugins and CDN firewalls block requests that look suspicious. Sometimes they're wrong. Common false positives include submitting forms with code snippets, saving certain content in your CMS, or using unusual URL parameters.
Clues that a firewall is involved:
- The 403 only appears when you perform a specific action, like saving a post
- The block page mentions a security service or shows a reference ID
- Your control panel's error log mentions ModSecurity and a rule ID
What to do:
- Check your security plugin's logs and whitelist your own IP if it was blocked
- Check your CDN's firewall events for the blocked request
- Ask your host to review the ModSecurity rule that triggered, rather than turning the whole firewall off
6. Your IP address is blocked
Too many failed logins can get your IP blocked by your security plugin, your server's firewall or your host. If the site works on mobile data but not your home connection, this is likely. Unblock your IP in the relevant tool, or ask your host to do it.
7. Hotlink protection or referrer rules
If images or files return 403 when embedded elsewhere, or even on your own site after a domain change, hotlink protection may be too strict. Update the list of allowed domains, making sure it includes both the www and non-www versions of your domain.
8. A plugin causing the block
In WordPress, a security, membership or redirect plugin can return 403 for certain pages. Temporarily rename the wp-content/plugins folder to see whether the error disappears, then re-enable plugins one at a time to find the culprit.
Check the error log
If you can't spot the problem, the error log usually names it. Look for messages such as "client denied by server configuration," "Permission denied," "Directory index forbidden by Options directive" or ModSecurity entries. Each one maps neatly to a cause above.
When to contact your host
If permissions, .htaccess and plugins all look fine, the block may be coming from server-level rules you can't see on shared hosting. Contact support with the URL, the time of the error and your IP address so they can check their firewall and server logs.
Wrapping up
A 403 Forbidden error means the server chose not to serve the request. The usual suspects are file permissions, a restrictive .htaccess file, a missing index file and security rules. Check them in that order, read the error log, and you'll usually find what's blocking access within a few minutes.