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 code | 403 |
|---|---|
| Name | Forbidden |
| Class | 4xx Client Error |
| Defined in | RFC 9110 §15.5.4 |
| Cacheable by default | No, 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?
- Check application permissions for that user and resource.
- On Linux servers, files usually need 644 and directories 755, owned by the web server user.
- 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.
- 400 Bad Request
- 401 Unauthorized
- 402 Payment Required
- 404 Not Found
- 405 Method Not Allowed
- 406 Not Acceptable
- 407 Proxy Authentication Required
- 408 Request Timeout
- 409 Conflict
- 410 Gone
- 411 Length Required
- 412 Precondition Failed
- 413 Content Too Large
- 414 URI Too Long
- 415 Unsupported Media Type
- 416 Range Not Satisfiable
- 417 Expectation Failed
- 418 I'm a teapot
- 421 Misdirected Request
- 422 Unprocessable Content
- 423 Locked
- 425 Too Early
- 426 Upgrade Required
- 428 Precondition Required
- 429 Too Many Requests
- 431 Request Header Fields Too Large
- 451 Unavailable For Legal Reasons
- 499 Client Closed Request
Frequently asked questions
Why does Googlebot get 403 but my browser doesn’t?
403 vs 404 for private resources?
Is 403 a client or server error?
Related
- 401 Unauthorized HTTP 401 Unauthorized means the request lacks valid authentication credentials: no token, an expired token or .
- 404 Not Found HTTP 404 Not Found means the server cannot find anything at the requested URL.
- 451 Unavailable For Legal Reasons HTTP 451 Unavailable For Legal Reasons means the server cannot provide the resource because of a legal demand,.
- 429 Too Many Requests HTTP 429 Too Many Requests means the client has sent too many requests in a given time and is being rate limit.
- Open the HTTP Status Codes Reference → Free, no signup.