10 min read
403 vs 404 Error Code: What’s the Difference and How to Fix Them?
Last updated: 6 November 2026
If you are comparing 403 vs 404 error codes, the short answer is simple: a 403 Forbidden error means the server understood your request and is refusing it, while a 404 Not Found error means the server found nothing at that URL, or will not say whether anything is there.
That distinction matters for troubleshooting, for SEO and for the visitor staring at the screen. A 403 usually points to permissions, security rules or access restrictions. A 404 usually points to deleted pages, broken links, bad URLs or missing files. Below we explain the difference, show how to tell them apart in seconds, and walk through the fixes on WordPress and other sites.
Quick answer
A 403 Forbidden error means the web server understood the request but refuses to fulfil it, usually because of permissions, a firewall or a login requirement. A 404 Not Found error means the server has no current page at that URL. Fix a 403 by checking permissions and security rules, and fix a 404 by restoring the page or adding a 301 redirect.
403 vs 404 Error Code: Quick Comparison
| Feature | 403 Forbidden | 404 Not Found |
|---|---|---|
| What it means | The server understood the request but refuses to fulfil it. | The server did not find a current page, or will not disclose that one exists. |
| Does the resource exist? | Usually yes, but access is blocked. | Usually no, or it moved. |
| Typical cause | Permissions, firewall rules, blocked IPs, missing login, protected content | Broken links, deleted pages, wrong URL, missing media, bad redirect |
| Is it temporary or permanent? | Depends on the rule that blocks it. | Not stated. A 410 Gone is the signal for permanent removal. |
| Best first fix | Check permissions, security rules, authentication and server config | Check the URL, restore the page, or add a 301 redirect |
| How Google treats it | Same as any other 4xx: the content is not used and is dropped from the index | Same as any other 4xx: the content is not used and is dropped from the index |
What Is a 403 Forbidden Error?
What it means
The HTTP specification, RFC 9110, defines 403 as a status code that “indicates that the server understood the request but refuses to fulfill it.” If you sent credentials, the server considers them insufficient, and the client should not repeat the request with the same credentials. The page, folder or file usually exists, but your user, role, IP address or request is not allowed to open it.
A 403 is different from a 401. A 401 asks you to authenticate, while a 403 says that who you are, or where you are coming from, is not enough.
Common causes of a 403 error
- The page requires authentication, but the visitor is not logged in or lacks the right role.
- File or directory permissions are wrong on the server.
- The server blocks specific IP addresses or user agents.
- A firewall, CDN or security plugin is denying the request.
- Access rules in
.htaccess, Nginx config or hosting settings are too strict. - Directory browsing is disabled and no default index file exists in the folder.
- Hotlink protection or a ModSecurity rule matched something in the URL or form data.
How to fix a 403 Forbidden error
- Check file and folder permissions. The WordPress hardening guide recommends 755 for directories and 644 for files, and 400 or 440 for the main configuration file. Anything stricter than that on a public file can produce a 403.
- Confirm the user has access. Log in with an account that should be able to see the page and test again.
- Review security plugins, firewall rules and CDN protections. Look at their block logs for the URL and your IP address, and allow-list the IP if it was a false positive.
- Inspect
.htaccess, Nginx rules or host-level settings fordenyorRequiredirectives. Our guide to testing .htaccess changes shows how to check them safely. - Temporarily disable a recent plugin or security rule if the error started after a change.
- Clear the site cache, server cache and CDN cache after each change so you are not testing a stored response.
What Is a 404 Not Found Error?
What it means
RFC 9110 says a 404 means the origin server “did not find a current representation for the target resource or is not willing to disclose that one exists.” It does not say whether the condition is temporary or permanent. If the server knows the removal is permanent, the specification prefers a 410 Gone.
That second half of the definition matters. A server that wants to hide a protected page may answer 404 instead of 403, so a 404 does not always mean the page is missing.
Common causes of a 404 error
- The URL was mistyped by the visitor.
- A page or post was deleted or moved without a redirect.
- Internal links or external backlinks point to an old or incorrect URL.
- Media files, category archives or custom post type URLs are no longer available.
- WordPress permalink settings changed and old URLs were not redirected.
- The rewrite rules in
.htaccessare missing or damaged, so WordPress never gets to handle the request.
How to fix a 404 Not Found error
- Double-check the URL for typos, trailing slashes and capital letters.
- Resave permalinks. In WordPress go to Settings, then Permalinks, and click Save Changes without altering anything. This regenerates the rewrite rules.
- Check the rewrite block in
.htaccess. On Apache, WordPress writes a block between# BEGIN WordPressand# END WordPress. If it is missing, add the default back:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
- Add a 301 redirect from the old URL to the new one if the page moved.
- Restore deleted content if the page should still exist.
- Update broken internal links in menus, posts and archive pages.
- Use crawl tools or Google Search Console to find and fix recurring 404s.
On Nginx there is no .htaccess, so the equivalent routing lives in the server block, and a missing try_files rule is the classic cause of WordPress 404s on every page except the home page.
403 vs 404: The Main Difference
403 Forbidden means the server knows what you are asking for, but it will not give it to you.
404 Not Found means the server has nothing to give you at that address, or will not say.
For a person, the difference tells them whether to log in or to check the address. For you as the site owner, it tells you where to look: configuration and permissions for a 403, content and links for a 404.
How to tell which one you have in 10 seconds
Open your browser developer tools, go to the Network tab and reload the page, or run this from a terminal:
curl -I https://example.com/the-page/
The first line shows the status code. If you get a 403 on a URL that works for you when logged in, look at roles and security rules. If you get a 404 on a URL that you know exists, resave permalinks and check the rewrite rules. If the page shows an error message but the status line says 200, you have a soft 404, which Google reports in Search Console and which needs a real 404 or a redirect.
Related status codes worth knowing
| Code | Name | Use it when |
|---|---|---|
| 401 | Unauthorized | The visitor must authenticate first. |
| 410 | Gone | You removed a page on purpose and it is not coming back. |
| 301 | Moved Permanently | The page has a new address and you want visitors and search engines to follow. |
| 429 | Too Many Requests | You want to slow a client down. Google treats this one differently from other 4xx codes. |
RFC 9110 describes 410 as intended to tell recipients that the resource is intentionally unavailable and that the owners want remote links removed. Google does not make a distinction in how it handles 404 and 410, so choose by meaning, not by an expected SEO gain.
Which Error Is Worse for SEO?
Neither error is a penalty, but both remove the page from search. Google Search Central says all 4xx errors except 429 are treated the same: Googlebot signals that the content does not exist, Google does not use content from URLs that return a 4xx status, and URLs already indexed that start returning a 4xx are removed from the index. That includes 403 as well as 404.
- A few 404s are normal on most sites, especially after content updates. Newly discovered 404 URLs are not processed.
- Google also says 4xx codes other than 429 have no effect on crawl rate, so the old advice that 404s waste crawl budget does not hold for Googlebot. The real cost is lost rankings and lost visitors when a page that used to bring traffic returns an error.
- A 403 on a public page is usually the more serious mistake, because it often comes from a security rule that blocks search engine bots by accident.
- Google warns against using 401 or 403 to limit its crawl rate.
If a page should exist and be public, neither a 403 nor a 404 is acceptable. Restore the page, fix permissions or redirect the old URL to the closest replacement.
How 403 and 404 Errors Affect WordPress Sites
On WordPress websites, these errors usually come from a short list of technical issues:
- Plugin conflicts
- Broken permalink or rewrite rules
- Incorrect file permissions
- Security plugin, firewall or CDN rules
- Migrated or deleted pages without redirects
- Theme or custom code changes
If the error appeared after an update, a migration or a server move, review recent changes first. Deactivate plugins one at a time, switch to a default theme to rule out custom routing, and read the server error log for the exact rule that fired. If the 403 appears only on wp-admin or the login page, check whether a security plugin or host rule limits access by IP. A sudden spread of 403 or 404 errors on pages you never touched can also be a sign of compromise, so read 5 signs your WordPress site has been hacked.
Best Practices to Prevent 403 and 404 Errors
- Monitor broken links regularly with Search Console or a crawler.
- Use 301 redirects when you change slugs or delete important content.
- Design a helpful custom 404 page with search and links to popular sections, and make sure it returns a real 404 status.
- Audit file permissions after migrations and manual uploads.
- Review firewall and security plugin logs when visitors report access problems.
- Test login-protected and public pages separately, and test as Googlebot’s user agent if you run a firewall.
- Keep a recent backup before editing server configuration files.
If you would rather hand this off, our WordPress security hardening service covers permissions, firewall rules and server configuration.
Frequently asked questions
Is 403 the same as 404?
No. A 403 means the server refuses to give you access to something it understood. A 404 means the server found no current page at that address, or will not disclose that one exists.
Can a 403 error hurt SEO?
Yes, if search engines are blocked from pages that should be public. Google treats a 403 like any other 4xx error and removes already indexed URLs that return it. Private pages that are meant to be restricted are a different case.
Should I redirect all 404 pages?
No. Redirect only when there is a relevant replacement page. If the content is permanently gone and has no equivalent, a 404 or a 410 is the honest answer, and sending every dead URL to the home page leaves visitors wondering where their page went.
What is the fastest fix for a WordPress 404?
Check the URL, then resave your permalinks under Settings, then Permalinks. If the page moved, add a 301 redirect from the old address.
What is the fastest fix for a WordPress 403?
Check file permissions (755 for folders and 644 for files), then your security plugin, firewall and server rules. Look in the block log for your IP address.
Why does a missing page sometimes show 403 instead of 404?
Usually because a rule blocks the path before the application can look for the page, such as a firewall rule or a directory with no index file and browsing disabled. Some servers also return 404 for pages that exist but are protected, which the HTTP specification allows.
Final Thoughts
When comparing 403 vs 404 error codes, remember this rule: 403 = access refused, 404 = nothing found at this address. Once you know which one you have, you know whether to look at permissions and security or at content and links. Protect public pages from accidental access restrictions, clean up broken links quickly, and use redirects where a real replacement exists.
If you manage a WordPress site, regular technical reviews stop both errors from turning into lost traffic.
Interesting Reads:
Related reading

