HTTP Response Codes

Understanding status codes and their meaning in web communication

Posted by Hüseyin Sekmenoğlu on January 05, 2010 Backend Development Frontend Development Full Stack Projects

HTTP response codes are three-digit numbers sent by the server to describe the result of a client’s request. They are grouped into five main categories.

πŸ“’ 1xx – Informational

Temporary responses indicating that the request is being processed.

  • 100 Continue – The server has received the request headers and the client can proceed with the request body.

  • 101 Switching Protocols – The server is changing protocols, such as from HTTP to WebSocket.

βœ… 2xx – Success

The request was successfully received, understood and processed.

  • 200 OK – The request succeeded.

  • 201 Created – The request succeeded and a new resource was created.

  • 204 No Content – The request succeeded but there is no content to send in the response.

πŸ”€ 3xx – Redirection

Further action is needed to complete the request.

  • 301 Moved Permanently – The resource has a new permanent URL.

  • 302 Found – The resource is temporarily located at a different URL.

  • 304 Not Modified – The resource has not changed since the last request.

⚠️ 4xx – Client Error

The request has invalid data or cannot be processed as sent.

  • 400 Bad Request – The request is malformed.

  • 401 Unauthorized – Authentication is required but missing or invalid.

  • 403 Forbidden – The request is understood but access is denied.

  • 404 Not Found – The resource could not be found.

πŸ’₯ 5xx – Server Error

The server failed to fulfill a valid request.

  • 500 Internal Server Error – A generic error occurred on the server.

  • 502 Bad Gateway – The server received an invalid response from an upstream server.

  • 503 Service Unavailable – The server is temporarily unable to handle the request.