403 Forbidden Error: What It Means & How to Fix It
Key takeaway
A 403 Forbidden error means the server understood your request and refuses to fulfil it: the page exists, but you aren't allowed to see it. The words under the message (nginx, Apache, Cloudflare, Access Denied) name the software that refused you. Visitors can only rule out their side (a VPN, another network, cookies); the block itself is a setting on the site: file permissions, a missing index file, a deny rule or a firewall.
Check it now

Start reading
- What Is a 403 Forbidden Error?
- What a 403 Error Looks Like
- 403 vs 401 vs 404: What's the Difference?
- Common Causes of 403 Forbidden Errors
- How to Fix 403 as a Visitor
- 1. Check the URL
- 2. Clear Browser Cache and Cookies
- 3. Disable Your VPN or Proxy
- 4. Try a Different Network or Device
- How to Fix 403 as a Site Owner
- 5. Fix File and Directory Permissions
- 6. Review .htaccess Rules
- 7. Add a Default Index File
- 8. Disable WordPress Plugins
- 9. Check IP Blocking and Firewall Rules
- 10. Check HTTPS and Client-Certificate Rules
- 11. Fix Cloudflare 403 / Error 1020
- 12. Fix Nginx 403 Forbidden
- Debugging 403 Errors with HTTP Headers
- Does a 403 Error Affect SEO?
- How to Prevent 403 Errors
- Frequently Asked Questions
What Is a 403 Forbidden Error?
A 403 Forbidden error means the server understood your request and refuses to fulfil it: the page exists, but you are not allowed to see it. Unlike a 404, the server knows exactly what you asked for. If the page shows "nginx" or "Apache" under the message, that is just the software the site runs: the refusal is that site's setting, not your browser.
The HTTP standard, RFC 9110 §15.5.4, defines it in those words: the server "understood the request but refuses to fulfill it". If you sent credentials, the server considers them insufficient, and a client "SHOULD NOT automatically repeat the request with the same credentials". A server may also answer 404 instead, to hide that the page exists at all.
In simple terms: the door exists, but you are not allowed through it. As a visitor you can only rule out your own side; as the site owner you can change the rule.
Is it 403 for everyone? Check from several places
What a 403 Error Looks Like
The words on the 403 page, and the server name under them, tell you which software refused you and so who can fix it:
| What the page says | Who refused you | What it usually means |
|---|---|---|
| 403 Forbidden with nginx (or nginx/1.27.4, angie, openresty) underneath | The site's nginx server (Angie and OpenResty are nginx-based) | A deny rule, a block of your IP, country or VPN, unreadable files, or a folder with no index file |
| The heading Forbidden and You don't have permission to access this resource. with an Apache/2.4 line | The site's Apache server | A Require all denied or Deny from rule, often in .htaccess, or file permissions |
| 403 - Forbidden: Access is denied. | Microsoft IIS | Folder permissions, or a sub-status such as 403.4 (HTTPS required) |
| 403 Forbidden with LiteSpeed Web Server | LiteSpeed (common on shared hosting) | Host-level security rules, permissions or .htaccess |
| Sorry, you have been blocked with a Cloudflare Ray ID | A Cloudflare WAF rule the site owner set | Your request matched a firewall rule: country, IP reputation, a bot rule |
| Error 1020: Access denied with a Ray ID | Another Cloudflare security feature | A blocking rule with no custom page (Cloudflare's docs give API schema and JWT checks as examples) |
| Access Denied. You don't have permission to access … on this server. Reference #18… | Akamai's edge firewall | Your IP, network, VPN or request pattern was blocked before reaching the site |
| 403 ERROR. The request could not be satisfied. Generated by cloudfront | Amazon CloudFront / AWS WAF | A WAF rule or a country restriction |
| Your access to this site has been limited by the site owner | Wordfence (a WordPress security plugin) | The plugin blocked your IP or request; only the owner can unblock it |
Whatever the wording, the meaning is the same: this server will not hand you this page. A browser extension or a stale cookie rarely causes it, but your IP address, network or VPN can be the reason for it.
403 vs 401 vs 404: What's the Difference?
These three error codes are often confused. Here is how they differ.
| Status Code | Meaning | Can You Fix It? | Example |
|---|---|---|---|
| 401 Unauthorized | You need to log in first | Yes — provide valid credentials | Accessing an admin panel without logging in |
| 403 Forbidden | You are logged in but not allowed | Depends — server is blocking you | Trying to access another user's files |
| 404 Not Found | The page does not exist | Check the URL spelling | Visiting a deleted or mistyped page |
The critical distinction: a 401 error tells you to authenticate. A 403 error tells you that authentication will not help — the server has already decided you cannot access this resource. A 404 means the resource does not exist at all.
If the server rejects the request itself as malformed, for example because of oversized cookies or a broken URL, you get 400 Bad Request instead. If the page exists but doesn't accept the method you used, such as a POST to a page that only serves GET, the answer is 405 Method Not Allowed.
Common Causes of 403 Forbidden Errors
Understanding why a 403 occurs helps you fix it faster. Here are the most common causes, split by whether you are a visitor or a site owner.
- Incorrect file permissions — files set to 600 or folders to 700 block public access
- Misconfigured .htaccess rules — deny directives or mod_rewrite rules blocking requests
- Missing index file — no index.html or index.php, and directory listing is disabled
- IP blocking — server or firewall rules blocking your IP address or country
- VPN, proxy or datacenter IP — many sites (streaming, ticketing, adult, banking) block VPN and hosting IP ranges as a policy, and a shared VPN IP may also be on a blocklist
- Hotlink protection — the server blocks direct linking to images or files from other domains
- WordPress plugin conflicts — security plugins like Wordfence or iThemes blocking requests
- Web Application Firewall (WAF) — Cloudflare, Sucuri, or ModSecurity flagging your request
- HTTPS or client-certificate rules — a server that requires HTTPS (IIS 403.4) or a client certificate (IIS 403.7) refuses requests without one. An expired certificate shows a browser privacy warning instead, not a 403
- Rate limiting — too many requests from your IP in a short time; most servers answer that with 429 Too Many Requests, some firewalls with 403
How to Fix 403 as a Visitor
If you are seeing a 403 error on a website you do not own, here are the steps to try. These are listed in order — start from the top.
1. Check the URL
The simplest fix is often the right one. Make sure you are visiting a page URL, not a directory URL. Many servers block directory browsing by default.
For example, visiting https://example.com/images/ (a folder) will return 403 on most servers, while https://example.com/images/logo.png (a specific file) works fine. Double-check for typos and ensure the URL points to an actual page.
2. Clear Browser Cache and Cookies
Your browser may be sending outdated cookies or cached authentication tokens that the server is rejecting. Clearing them forces a fresh request.
Chrome: Settings → Privacy → Clear browsing data → Cookies + Cached images
Firefox: Settings → Privacy → Clear Data → Cookies + Cache
Safari: Settings → Privacy → Manage Website Data → Remove All
Edge: Settings → Privacy → Clear browsing data → Cookies + CacheAfter clearing, close and reopen your browser, then try the URL again.
3. Disable Your VPN or Proxy
VPNs, proxies and Tor send your traffic from shared IP addresses in datacenters. Many sites block those ranges outright (streaming, ticketing, adult and banking sites especially), and a shared IP that someone else abused may be on a blocklist.
Disconnect the VPN and reload. If the page opens, the block is on the VPN's IP: pick a different server, or leave the VPN off for that site. If you're not using a VPN, check your own IP with What Is My IP and its reputation with the IP Blacklist Checker.
4. Try a Different Network or Device
If the 403 persists, switch to a different network (mobile data instead of Wi-Fi, or vice versa). This helps determine if your IP address is being blocked.
You can also try a different device or browser. If the page loads on one browser but not another, the issue is likely related to cached data or browser extensions, not an IP block.
How to Fix 403 as a Site Owner
If visitors are reporting 403 errors on your site — or you are seeing them yourself — the fix is almost always in your server configuration. Work through these checks in order.
5. Fix File and Directory Permissions
Incorrect file permissions are the number one cause of 403 errors on web servers. The standard permissions for a web server are 755 for directories and 644 for files.
Here is what those numbers mean: the first digit is the owner's permission, the second is the group, and the third is everyone else. 7 = read + write + execute, 5 = read + execute, 4 = read only.
# Fix directory permissions (755 = owner rwx, group rx, others rx)
find /var/www/html -type d -exec chmod 755 {} \;
# Fix file permissions (644 = owner rw, group r, others r)
find /var/www/html -type f -exec chmod 644 {} \;
# Verify ownership (should match your web server user)
ls -la /var/www/html/
# Change ownership to web server user if needed
chown -R www-data:www-data /var/www/html/6. Review .htaccess Rules
On Apache servers, the .htaccess file controls access rules. A single misconfigured line can block all visitors. Check for Deny from all directives or overly restrictive Require rules.
The fastest way to test: rename .htaccess to .htaccess.bak temporarily. If the 403 disappears, the problem is in that file.
# Temporarily rename .htaccess to test
mv /var/www/html/.htaccess /var/www/html/.htaccess.bak
# If 403 goes away, check the file for deny rules:
grep -i 'deny\|require\|allow' /var/www/html/.htaccess.bak
# Common problematic lines:
# Deny from all
# Require all denied
# Order deny,allowIf the site works without .htaccess, review it line by line. Look for Deny from all or Require all denied directives that may be blocking legitimate traffic. Replace them with specific rules that only block what you intend to block.
7. Add a Default Index File
When a visitor requests a directory URL (like example.com/blog/) without specifying a file, the server looks for a default index file. If none exists and directory listing is disabled, you get a 403.
The fix: create an index.html or index.php file in every publicly accessible directory. You can also configure the server to allow directory listing, but this is generally a security risk.
# In .htaccess or Apache config — set default index files
DirectoryIndex index.html index.php index.htm
# If you want to allow directory listing (not recommended for production):
Options +Indexes8. Disable WordPress Plugins
Security plugins like Wordfence, iThemes Security, Sucuri, and All In One WP Security can trigger 403 errors by blocking requests they consider suspicious. This often happens after a plugin update or rule change.
To test, rename the plugins folder via FTP or SSH to disable all plugins at once.
# Disable all plugins by renaming the folder
mv /var/www/html/wp-content/plugins /var/www/html/wp-content/plugins.bak
# If 403 goes away, re-enable plugins one by one:
mv /var/www/html/wp-content/plugins.bak /var/www/html/wp-content/plugins
# Then deactivate/reactivate each plugin from WordPress adminIf the 403 disappears, re-enable plugins one at a time to find the culprit. Check the plugin's firewall or security logs for blocked requests.
9. Check IP Blocking and Firewall Rules
Your server's firewall or hosting control panel may be blocking specific IP addresses, ranges, or entire countries. This is common with fail2ban, CSF (ConfigServer Security & Firewall), or hosting-level IP blocklists.
Check your firewall rules and server logs to see if legitimate IPs are being blocked.
# Check if an IP is blocked by iptables
iptables -L -n | grep "203.0.113.50"
# Check fail2ban jail status
fail2ban-client status
# Unban a specific IP
fail2ban-client set <jail-name> unbanip 203.0.113.50
# Check Apache deny rules in server config
grep -r 'Deny from\|Require not ip' /etc/apache2/10. Check HTTPS and Client-Certificate Rules
A 403 tied to TLS happens in two cases: the server requires HTTPS and the request came over plain HTTP (IIS reports this as 403.4, "SSL required"), or the server requires a client certificate the visitor didn't present (IIS 403.7; Apache rules built on SSLVerifyClient). An expired or wrong certificate shows the browser's privacy warning instead, never a 403.
Compare the two schemes for the same URL, and check the certificate itself with DNS Robot's SSL Checker:
# Same page over HTTP and HTTPS: a 403 on one only points at a scheme rule
curl -sI http://example.com/page | head -1
curl -sI https://example.com/page | head -111. Fix Cloudflare 403 / Error 1020
Behind Cloudflare, a 403 can come from Cloudflare instead of your server, and its page tells you which feature fired. A WAF custom or managed rule shows "Sorry, you have been blocked"; other security features with a Block action and no custom page show Error 1020: Access denied (Cloudflare's documentation, updated October 2026). Both carry a Ray ID.
Ask the visitor for a screenshot with the Ray ID, then search for it (or their IP) in the dashboard under Security → Analytics → Events: the event names the exact rule. Adjust that rule rather than lowering security everywhere.
- Security → WAF — review custom rules, check if legitimate paths are being blocked
- Security → Analytics → Events — find the Ray ID (timestamps are UTC) and see which rule triggered the block
- Security → Bots — Bot Fight Mode can block legitimate crawlers and API clients
- Security Level — if set to 'I'm Under Attack', all visitors see a challenge page
- IP Access Rules — check if your IP or country is accidentally blocked
12. Fix Nginx 403 Forbidden
Nginx returns 403 for several specific configuration issues. The most common: the Nginx worker process does not have read permission on the files, or the autoindex directive is off for a directory without an index file.
# Check Nginx error log for the exact cause
tail -f /var/log/nginx/error.log
# Common Nginx 403 causes and fixes:
# 1. Permission denied — Nginx runs as 'nginx' or 'www-data' user
# Fix: ensure the user running Nginx can read the files
chown -R nginx:nginx /var/www/html/
# 2. No index file in directory — add to server block:
location / {
index index.html index.php;
}
# 3. SELinux blocking access (CentOS/RHEL)
setsebool -P httpd_read_user_content 1
# Or set proper context:
chcon -R -t httpd_sys_content_t /var/www/html/SELinux is a frequently overlooked cause of Nginx 403 errors on CentOS and RHEL systems. Even if file permissions are correct, SELinux may block the Nginx process from reading files. The chcon command above fixes this.
Debugging 403 Errors with HTTP Headers
When you cannot pinpoint the cause, inspect the server's HTTP response headers. They often contain clues about why the request was blocked.
Use DNS Robot's HTTP Header Checker or curl from the terminal to see the full response.
# Check the status line and headers of a 403 page
curl -I https://example.com/restricted-page
# Headers that name the system in the path:
# server: cloudflare + cf-ray: 8f3a...-LAX → Cloudflare
# server: AkamaiGHost → Akamai
# server: CloudFront + x-amz-cf-id → Amazon CloudFront
# x-sucuri-id → Sucuri firewall
# x-iinfo → Imperva
# server: nginx / Apache / LiteSpeed → the site's own web serverA CDN or firewall header in a 403 means the block happened before the request reached your server, so look in that service's event log; your web server's own name means the rule is in your server config, .htaccess or a plugin.
Does a 403 Error Affect SEO?
Yes, 403 errors can hurt your search rankings if they affect crawlable pages. Google doesn't index URLs that return a 4xx code (429 aside), and removes URLs that were already indexed.
A few 403 errors on intentionally restricted pages (admin panels, private files) are normal and will not affect your SEO. But public pages that return 403 drop out of Google's index.
Search Console's Page indexing report lists these as "Blocked due to access forbidden (403)". Googlebot never sends credentials, so a 403 on a public page means a firewall or bot rule is blocking it.
How to Prevent 403 Errors
Prevention is easier than troubleshooting. Follow these practices to avoid 403 errors on your site.
- Set correct permissions from the start — 755 for directories, 644 for files, never 777
- Always have an index file — every public directory needs index.html or index.php
- Test .htaccess changes — back up the file before modifying, test one rule at a time
- Monitor your WAF rules — review Cloudflare, Sucuri, or ModSecurity logs weekly
- Whitelist your own IPs — ensure your office, home, and deployment server IPs are whitelisted
- Use HTTP Header Checker — regularly check your pages return 200, not 403
- Set up monitoring — use uptime monitoring to get alerts when pages start returning 403
Is it 403 for everyone, or just you?
Run the page through DNS Robot's free Website Down Checker: it asks from several places at once and shows the status each one gets. A 403 everywhere is the site's rule; a 403 only for you is your network, VPN or IP.
Sources
- RFC 9110: HTTP Semantics, §15.5.4 403 Forbidden, IETF
- Error 1020 (Cloudflare 1xxx errors), Cloudflare
- How HTTP status codes, and network and DNS errors affect Google Search, Google Search Central
Frequently Asked Questions
What does 403 Forbidden mean?
What does "403 Forbidden nginx" mean?
What does "Forbidden" with "You don't have permission to access this resource" mean?
How do I fix a 403 Forbidden error?
Does 403 Forbidden mean I am blocked?
Why do I get 403 Forbidden with a VPN?
What is the difference between 403 and 401?
Why does Cloudflare show 403 Error 1020?
What file permissions fix a 403 error?
Can a 403 error affect SEO?
Related Articles
Related Tools
Website Down Checker
Is it down for everyone or just you? Check any site from 11 places and your own connection, with a live screenshot
HTTP Header Checker
Response headers exactly as sent, with a Mozilla Observatory security grade
SSL Certificate Check
Verify SSL certificate validity and security details
DNS Lookup
Every DNS record from the domain's own nameservers, beside Google's and Cloudflare's cache
Port Checker
Test port connectivity and service availability



