HTTP status codes are three-digit server responses that tell a browser, search engine crawler or application what happened after an HTTP request. All registered HTTP status codes are 100, 101, 102, 103, 104; 200, 201, 202, 203, 204, 205, 206, 207, 208, 226; 300, 301, 302, 303, 304, 305, 306, 307, 308; 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 421, 422, 423, 424, 425, 426, 428, 429, 431, 451; and 500, 501, 502, 503, 504, 505, 506, 507, 508, 510 and 511. The codes are divided into five classes: 1xx informational, 2xx success, 3xx redirection, 4xx client error and 5xx server error.
I explain all in detail. Let me start with 1xx HTTP status codes.
What Are the 1xx HTTP Status Codes and What Are They For?
1xx HTTP status codes are 100, 101, 102, 103 and 104. 1xx codes are informational responses that tell the client that the request has been received and processing is continuing. IANA currently lists 104 as a temporary registration that expires on November 13, 2026 unless extended or made permanent. Let me explain in the table.
| Code | Status | What It Means / What It Is For |
|---|---|---|
| 100 | Continue | The server received the first part of the request and tells the client to continue sending it. |
| 101 | Switching Protocols | The server agrees to switch to another protocol requested by the client. |
| 102 | Processing | The server received the request and is still processing it. This WebDAV status is deprecated. |
| 103 | Early Hints | The server sends early header information before the final response, commonly allowing resources to start loading earlier. |
| 104 | Upload Resumption Supported | The server indicates support for the resumable-upload mechanism. It is currently a temporary registered status code. |
What Are the 2xx HTTP Status Codes and What Are They For?
2xx HTTP status codes are 200, 201, 202, 203, 204, 205, 206, 207, 208 and 226. 2xx codes mean the server successfully received, understood and accepted the request, although the exact result depends on the individual code. Let me explain in the table.
| Code | Status | What It Means / What It Is For |
|---|---|---|
| 200 | OK | The request succeeded and the server returns the requested result. |
| 201 | Created | The request succeeded and created a new resource. |
| 202 | Accepted | The server accepted the request for processing, but processing is not finished yet. |
| 203 | Non-Authoritative Information | The returned information was modified or supplied by an intermediary rather than the origin server. |
| 204 | No Content | The request succeeded, but the server has no response body to return. |
| 205 | Reset Content | The request succeeded and the client should reset the document or input view. |
| 206 | Partial Content | The server returns only the requested part of a resource, such as a byte range of a file. |
| 207 | Multi-Status | A WebDAV response contains separate status information for multiple resources or operations. |
| 208 | Already Reported | A WebDAV response indicates that a resource was already reported earlier in the same response. |
| 226 | IM Used | The server fulfilled the request using one or more instance manipulations on the resource. |
What Are the 3xx HTTP Status Codes and What Are They For?
3xx HTTP status codes are 300, 301, 302, 303, 304, 305, 306, 307 and 308. 3xx codes are mainly used when another action is required, such as redirecting the client to another URL or reusing a cached version of a resource. Let me explain in the table.
| Code | Status | What It Means / What It Is For |
|---|---|---|
| 300 | Multiple Choices | The requested resource has multiple possible representations or locations. |
| 301 | Moved Permanently | The resource has permanently moved to another URL. |
| 302 | Found | The resource is temporarily available at another URL. |
| 303 | See Other | The client should retrieve another URL, normally with a GET request. |
| 304 | Not Modified | The resource has not changed, so the client can reuse its cached copy. |
| 305 | Use Proxy | The old response instructed the client to access the resource through a proxy. The status is deprecated. |
| 306 | Unused | The code is reserved and has no current HTTP function. |
| 307 | Temporary Redirect | The resource is temporarily at another URL while preserving the original HTTP method. |
| 308 | Permanent Redirect | The resource permanently moved while preserving the original HTTP method. |
What Are the 4xx HTTP Status Codes and What Are They For?
4xx HTTP status codes are 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 421, 422, 423, 424, 425, 426, 428, 429, 431 and 451. 4xx codes indicate that the request cannot be completed because of the requested resource, authentication, permissions, request format, rate limit or another client-side condition. Let me explain in the table.
| Code | Status | What It Means / What It Is For |
|---|---|---|
| 400 | Bad Request | The server cannot process the request because the request is malformed or invalid. |
| 401 | Unauthorized | Authentication is required or the supplied authentication is invalid. |
| 402 | Payment Required | Reserved for future use related to payment; HTTP does not define a general payment mechanism for it. |
| 403 | Forbidden | The server understands the request but refuses to allow access. |
| 404 | Not Found | The requested resource cannot be found at the URL. |
| 405 | Method Not Allowed | The URL exists, but the HTTP method used for the request is not allowed. |
| 406 | Not Acceptable | The server cannot return a representation that satisfies the client’s requested content requirements. |
| 407 | Proxy Authentication Required | The client must authenticate with the proxy before continuing. |
| 408 | Request Timeout | The server stopped waiting because the complete request did not arrive in time. |
| 409 | Conflict | The request conflicts with the current state of the resource. |
| 410 | Gone | The resource has been intentionally removed and is no longer available. |
| 411 | Length Required | The server requires a valid Content-Length for the request. |
| 412 | Precondition Failed | A condition supplied with the request evaluated to false. |
| 413 | Content Too Large | The request content is larger than the server is willing or able to process. |
| 414 | URI Too Long | The requested URI is longer than the server will process. |
| 415 | Unsupported Media Type | The server does not support the request’s media or content format. |
| 416 | Range Not Satisfiable | The requested byte range cannot be supplied from the resource. |
| 417 | Expectation Failed | The server cannot meet an expectation specified in the request. |
| 418 | Unused | RFC 9110 reserves this code as unused; it has no normal standard HTTP function. |
| 421 | Misdirected Request | The request reached a server that cannot produce the correct response for that target. |
| 422 | Unprocessable Content | The request syntax is valid, but the server cannot process its instructions. |
| 423 | Locked | The requested WebDAV resource is locked. |
| 424 | Failed Dependency | The request failed because another operation it depended on failed. |
| 425 | Too Early | The server refuses to process the request because replaying it could create a risk. |
| 426 | Upgrade Required | The server requires the client to switch to another protocol. |
| 428 | Precondition Required | The server requires the request to contain a condition before processing it. |
| 429 | Too Many Requests | The client sent too many requests within a period of time. |
| 431 | Request Header Fields Too Large | The request headers are too large for the server to process. |
| 451 | Unavailable For Legal Reasons | Access to the resource is unavailable because of a legal demand or restriction. |
What Are the 5xx HTTP Status Codes and What Are They For?
5xx HTTP status codes are 500, 501, 502, 503, 504, 505, 506, 507, 508, 510 and 511. 5xx codes indicate that the server received an apparently valid request but could not successfully complete it because of a server, gateway, storage, protocol or network problem. Let me explain in the table.
| Code | Status | What It Means / What It Is For |
|---|---|---|
| 500 | Internal Server Error | A general server error prevented the request from being completed. |
| 501 | Not Implemented | The server does not support the functionality required to complete the request. |
| 502 | Bad Gateway | A gateway or proxy received an invalid response from an upstream server. |
| 503 | Service Unavailable | The server is temporarily unavailable, commonly because of maintenance or overload. |
| 504 | Gateway Timeout | A gateway or proxy did not receive a response from an upstream server in time. |
| 505 | HTTP Version Not Supported | The server does not support the HTTP version used in the request. |
| 506 | Variant Also Negotiates | A server configuration error created a circular content-negotiation reference. |
| 507 | Insufficient Storage | The server does not have enough storage to complete the WebDAV operation. |
| 508 | Loop Detected | The server detected an infinite loop while processing a WebDAV request. |
| 510 | Not Extended | An obsolete status code that indicated further request extensions were required. |
| 511 | Network Authentication Required | The client must authenticate with the network, such as through a captive Wi-Fi portal. |
The IANA registry marks 510 Not Extended as obsolete, and values 512–599 are currently unassigned.
What Are the Methods to Set HTTP Status Code?
The methods to set HTTP status code are web-server configuration, application or framework response code, redirect rules, error handlers, CMS or hosting settings and server-side API methods. For example, application code can return 200, 404 or 500; Apache or Nginx can create redirects and errors; and Java Servlet can use setStatus(), sendError() or redirect methods to control HTTP responses.
The correct method depends on where the HTTP response is generated. A permanent URL move should normally return 301 or 308, a missing resource should return 404 or 410, and a temporary server outage can return 503 instead of showing an error page with 200 OK.
How Do Status Codes Affect Your Site’s Presence in Google Search?
HTTP status codes affect how Google crawls, processes and indexes URLs. 2xx responses allow Google to process returned content, although a successful response does not guarantee indexing. 301 and 308 redirects tell Google that a URL moved permanently, while 302, 303 and 307 indicate temporary redirection. 304 tells Google that the content has not changed and its previous copy can continue to be used.
Most 4xx responses prevent the returned content from being indexed and can cause previously indexed URLs to disappear from Google over time. 5xx responses and 429 signal server problems, causing Google to reduce crawling; persistent server errors can eventually cause URLs to leave the index. Google states that a working page normally needs to return 200 success to meet its basic technical requirements for Search eligibility.
How to Track HTTP Status Codes of My Website?
To track HTTP status codes of your website, inspect individual URLs in the browser or terminal and use a site crawler, server logs or Google Search Console when you need to monitor many URLs.
- Open the website in Chrome. Open the page whose status code you want to check.
- Open Developer Tools. Press
F12, right-click the page and choose Inspect, or use the browser’s Developer Tools shortcut. - Open the Network tab. Chrome records HTTP requests while the Network panel is open.
- Reload the page. Reloading records the main HTML document and its images, JavaScript, CSS and other requests.
- Check the Status column. Chrome shows response codes such as 200, 301, 404 or 500 beside each request. The Network panel can also be filtered by
status-code. - Check a URL with the command line. Run
curl -I https://example.com/pageto retrieve the response headers and see the HTTP status. - Crawl the complete website. Use a website crawler when you need to find 3xx redirects, broken 4xx URLs and 5xx server errors across hundreds or thousands of URLs.
- Check Google Search Console. Use URL Inspection for specific URLs and Page Indexing or Crawl Stats reports to find crawling and server-response problems seen by Google.
- Check server logs. Server access logs show the status returned for real browser, bot and application requests and are useful for monitoring repeated 404, 429 and 5xx responses.
- Fix incorrect responses. A working page should not return 404, a deleted page should not return 200, and a permanent redirect should not be configured as a temporary redirect without a reason.
What Is Servlet?
A Servlet is a Java server-side component that receives requests and generates responses inside a servlet container. For HTTP responses, HttpServletResponse allows a servlet to set status codes with methods such as setStatus(int) and sendError(int).
Muhammad Saad