HTTP Status Codes

HTTP 403 Forbidden

By Error Admin in 4xx Client Error Code, HTTP Status Codes

HTTP 403 Status Code: The HTTP 403 Forbidden means that the server understood the request but refuses to process or respond to it. Authorization is not a solution because the resource requested by the client is considered forbidden by the server as you don’t have permission to access it. A server that wishes to specify the reason for forbidding access will display in the response payload.

HTTP 403 Forbidden

HTTP 403 Forbidden

If the authentication credentials were provided in the request, the server considers them insufficient to permit access. The user should not repeat the request wit the same credentials instead try repeating with new or different credentials. However, the request will be rejected for unrelated credentials. An origin server that wishes to “hide” the current existence of a forbidden target resource can instead respond with a status code of HTTP 404 Not Found.

Reasons for 403 Forbidden Error

Forbidding the directory website for a website os the most common reason for this 403 Status code. Almost all the sites expect you to navigate the site with the URLs in the web pages. They forbid your access to browse the file directory of the site

Fix 403 Forbidden Error

The below steps will help you fix 403 Forbidden Error code.

  1. Firstly confirm if you have encountered a “No directory browsing” issue. Check for the URL if it ends with a slash ‘/’ instead of a web page with a .htm or .html. If this the issue then you have no other option but to access individual web pages of that website.
  2. Make sue that there should be some content in the directory. If not, until any content is added to the home page directory that is assigned by your ISP, a 403 Forbidden message will be thrown to the visitors.
  3. If you have secured your website strong enough, that is not open to the casual internet users, then there are chances of 401 Not Authorised message being displayed.
  4. The 403 Error may also arise if you have once hosted the site but now no longer do so. It will not have any redirection to the new URL. So if you have made any recent changes to your site 403 forbidden is a possibility.
  5. If you are sure that the website should be accessed to all as you have not made any recent changes to the site, then more likely the site could have some deeper problem.
  6. If you don’t have any of these issues but still continue to get a 403 Forbidden code, then it is the web server that disallows certain patterns of HTTP traffic. That is the server allows communications from a well-known browser but not from automated communications which are then rejected using the 403 Error Code.

HTTP 403 Code References

The HTTP 403 Status Code References are listed below.

  • Rails HTTP Status Symbol :forbidden
  • Go HTTP Status Constant http.StatusForbidden
  • Symfony HTTP Status Constant Response::HTTP_FORBIDDEN
  • Python2 HTTP Status Constant httplib.FORBIDDEN
  • Python3+ HTTP Status Constant http.client.FORBIDDEN
  • Python3.5+ HTTP Status Constant http.HTTPStatus.FORBIDDEN

Know more about HTTP 403 Forbidden from HTTP Status Codes.

Other HTTP Status Codes

HTTP Verbs

HTTP Methods

1xx Informational

100 Continue

101 Switching Protocol

102 Processing

2xx Success

200 OK

201 Created

202 Accepted

203 Non-Authoritative Information

204 No Content

205 Reset Content

206 Partial Content

207 Multi-Status (WebDAV; RFC 4918)

208 Already Reported (WebDAV; RFC 5842)

226 IM Used (RFC 3229)

3xx Redirection

300 Multiple Choice

301 Moved Permanently

302 Found

303 See Other

304 Not Modified

305 Use Proxy

306 Unused

307 Temporary Redirect

308 Temporary Redirect

4xx Client Error

400 Bad Request

401 Unauthorized

402 Payment Required

403 Forbidden

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 Payload Too Large

414 URI Too Long

415 Unsupported Media Type

416 Requested Range Not Satisfiable

417 Expectation Failed

418 I’m a teapot (RFC 2324)

421 Misdirected Request

422 Unprocessable Entity (WebDAV; RFC 4918)

423 Locked (WebDAV; RFC 4918)

424 Failed Dependency (WebDAV; RFC 4918)

426 Upgrade Required

428 Precondition Required

429 Too Many Requests

431 Request Header Fields Too Large

451 Unavailable For Legal Reasons

5xx Server Error

500 Internal Server Error

502 Bad Gateway

503 Service Unavailable

504 Gateway Timeout

505 HTTP Version Not Supported

506 Variant Also Negotiates

507 Variant Also Negotiates

508 Loop Detected (WebDAV; RFC 5842)

510 Not Extended (RFC 2774)

511 Network Authentication Required

Unofficial Error Code List

103 Checkpoint

420 Method Failure (Spring Framework)

420 Enhance Your Calm (Twitter)

450 Blocked by Windows Parental Controls (Microsoft)

498 Invalid Token (Esri)

499 Token Required (Esri)

499 Request forbidden by antivirus

509 Bandwidth Limit Exceeded (Apache Web Server/cPanel)

530 Site is frozen

Internet Information Services Error Code List

449 Retry With

451 Redirect

444 No Response

Nginx Error Code List

495 SSL Certificate Error

496 SSL Certificate Required

497 HTTP Request Sent to HTTPS Port

499 Client Closed Request

CloudFlare Error Code List

520 Unknown Error

521 Web Server Is Down

522 Connection Timed Out

523 Origin Is Unreachable

524 A Timeout Occurred

525 SSL Handshake Failed

526 Invalid SSL Certificate

    1 Comment

  1. Nice post.


    January 19, 2017

Post a Reply

Your email address will not be published. Required fields are marked *