Start free · Free tools · Fair usage limits
Browse Tools

Categories

Custom AI Solutions – AI2Flows
LIVE NEWS
Loading latest AI & SEO news…
Home›Tools›HTTP Status Codes Reference›HTTP 403 Forbidden
4xx Client Error

HTTP 403 Forbidden

HTTP 403 Forbidden means the server understood the request but refuses to allow it. The client may be authenticated, but it lacks permission, or the request…

Quick answer

HTTP 403 Forbidden means the server understood the request but refuses to allow it. The client may be authenticated, but it lacks permission, or the request is blocked by a firewall, IP rule, bot protection or file permissions. Re-sending the same credentials will not help.

Last updated · Maintained by FreeAIToolz · How we test

What does HTTP 403 Forbidden mean?

A 403 can come from your application (a role check), the web server (directory listing disabled, wrong file permissions), or a security layer (WAF, Cloudflare, rate rules). Servers may also return 404 instead of 403 to hide that a resource exists.

Status code403
NameForbidden
Class4xx Client Error
Defined inRFC 9110 §15.5.4
Cacheable by defaultNo, unless Cache-Control says so
Safe to retry automatically?No: change the request first

What causes HTTP 403?

  • The user’s role lacks permission.
  • Wrong file or directory permissions on the server (for example 600 on a public file).
  • No index file in a directory with listing disabled.
  • WAF, CDN or bot-protection rules blocking the IP, country or user agent.

How do I fix HTTP 403?

  1. Check application permissions for that user and resource.
  2. On Linux servers, files usually need 644 and directories 755, owned by the web server user.
  3. Check WAF or CDN firewall logs; whitelist verified crawlers such as Googlebot.

What should a client do after HTTP 403?

Do not retry. Ask for access or use a different account.

Does HTTP 403 affect SEO?

If Googlebot gets 403, the page drops out of the index. Check Search Console’s URL Inspection; bot protection blocking Google is a common cause of sudden de-indexing.

Example 403 response

HTTP/1.1 403 Forbidden
Date: Mon, 01 Dec 2026 12:00:00 GMT
Content-Type: application/json

{"error":{"status":403,"message":"Forbidden"}}

How to return 403 Forbidden in code

Express (Node.js)

res.status(403).json({ error: 'Forbidden' });

Next.js route handler

return Response.json({ error: 'Forbidden' }, { status: 403 });

FastAPI (Python)

raise HTTPException(status_code=403, detail="Forbidden")

PHP

http_response_code(403);

Nginx

location = /example {
    return 403;
}

Other 4xx status codes

The request contains an error or cannot be fulfilled as sent. Fix the request before retrying.

Frequently asked questions

Why does Googlebot get 403 but my browser doesn’t?
A firewall, CDN bot rule or security plugin is blocking crawler user agents or IP ranges. Allow verified Googlebot (verify by reverse DNS) in those rules.
403 vs 404 for private resources?
Use 403 when it is fine to reveal the resource exists. Use 404 when even revealing its existence is a risk.
Is 403 a client or server error?
403 is in the 4xx class, so it is classed as a client error: the request needs to change before it can succeed.