HTTP STATUS CODES EXPLAINED

WHAT IS AN HTTP STATUS CODE?

Have you ever encountered an error 404 while browsing a webpage? This is one of the most common status codes, indicating that the requested URL is not found.

This is just one example of a status code. There are numerous status codes that you might encounter while browsing the web.

Every time you navigate to a webpage or click on a specific URL, your computer sends a request to the server for the required file. The server then responds with a status code.

WHAT IS THE PURPOSE OF THESE STATUS CODES?

Status codes convey information about issues or problems on a webpage. They can indicate failures in loading images, scripts, or even the entire webpage.

GET 20% OFF ON ALL HOSTING PLANS!

Unlock 20% Off on All Hosting Plans with Hostinger!

For instance, the 404 status code typically appears when the requested URL is not available on the server. This could occur due to various reasons:

  1. The URL does not exist (possibly due to typing errors).
  2. The URL has been recently removed, even from the cache.
  3. The URL is blocked for specific reasons.

DO STATUS CODES INDICATE ERRORS?

Not always. Status codes are sent from the server even when a request is successful. Essentially, they are records of the server’s actions for each attempt.

For example, if you successfully retrieve a URL from the server, it generates a status code that is not visible to you. The 200 status code, for instance, indicates that the server request was successfully processed.

While status codes are not always visible, they often come with a reason phrase that explains their meaning. For example, the reason phrase for the 404 status code is “NOT FOUND,” indicating that the requested URL is not available on the server.

Similarly, the 200 status code is accompanied by the reason phrase “OK.”

COMMONLY ENCOUNTERED STATUS CODES

Here’s a breakdown of commonly encountered status codes:

STATUS CODES BEGINNING WITH 100

  • 100 Continue
  • 101 Switching Protocols
  • 102 Processing

STATUS CODES BEGINNING WITH 200

  • 200 OK
  • 201 Created
  • 202 Accepted
  • 203 Non-authoritative Information
  • 204 No Content
  • 205 Reset Content
  • 206 Partial Content
  • 207 Multi-Status
  • 208 Already Reported
  • 226 IM Used

STATUS CODES BEGINNING WITH 300

  • 300 Multiple Choices
  • 301 Moved Permanently
  • 302 Found
  • 303 See Other
  • 304 Not Modified
  • 305 Use Proxy
  • 307 Temporary Redirect
  • 308 Permanent Redirect

STATUS CODES BEGINNING WITH 400

  • 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 Request-URI Too Long
  • 415 Unsupported Media Type
  • 416 Requested Range Not Satisfiable
  • 417 Expectation Failed
  • 418 I’m a teapot
  • 421 Misdirected Request
  • 422 Unprocessable Entity
  • 423 Locked
  • 424 Failed Dependency
  • 426 Upgrade Required
  • 428 Precondition Required
  • 429 Too Many Requests
  • 431 Request Header Fields Too Large
  • 444 Connection Closed Without Response
  • 451 Unavailable For Legal Reasons
  • 499 Client Closed Request

STATUS CODES BEGINNING WITH 500

  • 500 Internal Server Error
  • 501 Not Implemented
  • 502 Bad Gateway
  • 503 Service Unavailable
  • 504 Gateway Timeout
  • 505 HTTP Version Not Supported
  • 506 Variant Also Negotiates
  • 507 Insufficient Storage
  • 508 Loop Detected
  • 510 Not Extended
  • 511 Network Authentication Required
  • 599 Network Connect Timeout Error

These status codes help in understanding and diagnosing issues encountered while browsing the web. Next time you encounter an error on a webpage, you’ll have a better understanding of what it means and how to address it.

Leave a Comment

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

Scroll to Top