CompTIA Security+ Exam Notes

CompTIA Security+ Exam Notes
Let Us Help You Pass

Sunday, October 5, 2025

HTTP Status Codes Explained: From 1xx to 5xx and What They Mean

 HTTP Status Codes

URL status codes—also known as HTTP status codes—are standardized responses sent by a web server to a client (like a browser) to indicate the outcome of a request. These codes are grouped into five categories based on their first digit:

HTTP Status Code Categories
1xx – Informational
These codes indicate that the request was received and understood, and the server is continuing the process.
  • 100 Continue: The server has received the request headers, and the client should proceed to send the request body.
  • 101 Switching Protocols: The server is switching protocols as requested by the client.
  • 102 Processing: The server has received and is processing the request; however, a response is not yet available.
2xx – Success
These codes mean the request was successfully received, understood, and accepted.
  • 200 OK: The request was successful.
  • 201 Created: The request was successful, and a new resource was created.
  • 202 Accepted: The request has been accepted for processing but has not been completed.
  • 204 No Content: The server successfully processed the request, but no content is available to return.
3xx – Redirection
These codes indicate that further action is needed to complete the request.
  • 301 Moved Permanently: The resource has been permanently moved to a new URL.
  • 302 Found: The resource is temporarily located at a different URL.
  • 304 Not Modified: The resource has not been modified since the last request (used for caching).
  • 307 Temporary Redirect: The request should be repeated with a different URL, but subsequent requests should still use the original URL.
4xx – Client Errors
These codes indicate that the client made an error in the request.
  • 400 Bad Request: The server was unable to understand the request due to invalid syntax.
  • 401 Unauthorized: Authentication is required and has failed or not been provided.
  • 403 Forbidden: The server understood the request but refuses to authorize it.
  • 404 Not Found: The requested resource could not be found.
  • 405 Method Not Allowed: The HTTP method used is not allowed for the requested resource.
  • 408 Request Timeout: The server timed out waiting for the request.
  • 429 Too Many Requests: The user has sent too many requests in a given amount of time (rate limiting).
5xx – Server Errors
These codes indicate that the server failed to fulfill a valid request.
  • 500 Internal Server Error: A generic error message when the server encounters an unexpected condition.
  • 501 Not Implemented: The server does not support the functionality required to fulfill the request.
  • 502 Bad Gateway: The server received an invalid response from an upstream server.
  • 503 Service Unavailable: The server is currently unavailable (overloaded or down).
  • 504 Gateway Timeout: The server didn’t receive a timely response from an upstream server.
Why Are Status Codes Important?
  • Debugging: Helps developers identify and fix issues.
  • SEO: Search engines use status codes to understand site structure and health.
  • User Experience: Ensures users receive appropriate feedback when an issue occurs.

No comments:

Post a Comment