Is this your problem?
- "403 Forbidden" or "You do not have permission to access this page"
- It hits the whole site, one folder, or the wp-admin area only
- It started after a security plugin, a firewall change or a host move
- Only some visitors get it, often by country or IP, pointing at a firewall rule
- A directory shows "Forbidden" because there is no index file to show
What usually causes it
How to tell: Files should generally be 644 and folders 755. Wrong permissions make the server refuse them.
How to tell: A folder with no index.html or index.php, and directory listing turned off, returns 403.
How to tell: A rule is blocking the request, sometimes by IP, country, or a pattern it reads as an attack.
How to tell: A deny rule, or a broken .htaccess, blocks access to the site or a folder.
How to tell: The host firewall or a mod_security rule flagged the request as suspicious.
Before you touch anything
- Note whether the 403 is the whole site, one page or folder, or just the admin area; each points at a different cause.
- Note what changed just before: a plugin, a permissions change, a host move or a firewall.
How to fix it, step by step
-
1
Check file and folder permissions
In the host file manager or over SFTP, set folders to 755 and files to 644. A folder set to 777 or an odd value often triggers a 403.
-
2
Make sure there is an index file
If a folder 403s, it has no index file and listing is off. Add the right index page, or the link should point at a real file.
-
3
Rename .htaccess to test it
If you have an .htaccess (Apache), rename it to .htaccess-off and reload. If the 403 clears, a rule in it is the cause; regenerate a clean one.
-
4
Turn off the security plugin or firewall
Deactivate a security plugin, or pause the firewall, and retry. If it clears, a rule is too strict; allow-list your address or loosen the rule.
-
5
Check if your own IP is blocked
If only you get it after failed logins, your address may be blocked. Wait, use another network, or have the host or plugin allow-list you.
-
6
Ask the host about mod_security
If nothing above fixes it, the host firewall (mod_security) may be blocking a request. The host can see the rule and lift or tune it.
Stop and get help if
- The whole site 403s, you have checked permissions and .htaccess, and it points at the host firewall.
- The admin area is locked by 403 and you cannot get in to change anything.
- The block is by country or pattern and tuning it risks letting real attacks through.
Stop it happening again
- Keep file permissions correct (644 files, 755 folders); do not set 777.
- Keep one security plugin, configured, rather than several fighting each other.
- Back up .htaccess before editing it, so a bad rule is easy to undo.
- Allow-list your own address in the firewall so you are not locked out.
Questions people ask
Is a 403 a hack?
Usually not. It is a permission or a rule refusing access, not a break-in. It is worth a look if it appeared with other odd behaviour.
Why only the admin area?
A security rule often protects the login or admin path by IP or country. Allow-list your address or adjust that specific rule.
What is 403 versus 401?
A 401 asks you to log in; a 403 refuses even if you are logged in. A 403 is about permission, not identity.