HTTP - Status Codes
HTTP - Status Codes
1xx:
It means the request has been received and the process is continuing.
Informational
3xx: Redirection It means further action must be taken in order to complete the request.
4xx: Client Error It means the request contains incorrect syntax or cannot be fulfilled.
5xx: Server Error It means the server failed to fulfill an apparently valid request.
HTTP status codes are extensible and HTTP applications are not required to understand the
meaning of all the registered status codes. Given below is a list of all the status codes.
1xx: Information
Message Description
Only a part of the request has been received by the server, but as long as
100 Continue
it has not been rejected, the client should continue with the request.
101 Switching
The server switches protocol.
Protocols
2xx: Successful
Message Description
203 Non-
The information in the entity header is from a local or third-party copy,
authoritative
not from the original server.
Information
A status code and a header are given in the response, but there is no
204 No Content
entity-body in the reply.
The browser should clear the form used for this transaction for
205 Reset Content
additional input.
Example
The server response against the above GET request will be as follows:
HTTP/1.1 200 OK
Date: Tue, 16 Dec 2024 18:59:38 GMT
Server: Apache/2.4.59 (Ubuntu)
Vary: Accept-Encoding,Origin
Content-Length: 20241
Content-Type: text/html; charset=UTF-8
Explore our latest online courses and learn new skills at your own pace. Enroll and become a
certified expert to boost your career.
3xx: Redirection
Message Description
300 Multiple A link list. The user can select a link and go to that location. Maximum
Choices five addresses.
Page 3 of 5
301 Moved
The requested page has moved to a new url.
Permanently
302 Found The requested page has moved temporarily to a new url.
303 See Other The requested page can be found under a different url.
This code was used in a previous version. It is no longer used, but the
306 Unused
code is reserved.
307 Temporary
The requested page has moved temporarily to a new url.
Redirect
Example
The server response against the above GET request will be as follows:
Message Description
402 Payment Required You can not use this code yet.
404 Not Found The server can not find the requested page.
Page 4 of 5
407 Proxy
You must authenticate with a proxy server before this request can
Authentication
be served.
Required
408 Request Timeout The request took longer than the server was prepared to wait.
The "Content-Length" is not defined. The server will not accept the
411 Length Required
request without it.
412 Precondition The pre condition given in the request evaluated to false by the
Failed server.
413 Request Entity Too The server will not accept the request, because the request entity is
Large too large.
The server will not accept the request, because the url is too long.
414 Request-url Too
Occurs when you convert a "post" request to a "get" request with a
Long
long query information.
415 Unsupported The server will not accept the request, because the mediatype is
Media Type not supported.
Example
The server response against the above GET request will be as follows:
Content-Type: text/html
Content-Length: 178
Server: gunicorn/19.9.0
Allow: POST, OPTIONS
Message Description
The request was not completed. The server did not support the
501 Not Implemented
functionality required.
Example
The server response against the above GET request will be as follows: