The Ultimate Guide to HTTP Status Codes & What They Mean
7 mins read

The Ultimate Guide to HTTP Status Codes & What They Mean

HTTP Status

What is an HTTP status code?

An HTTP status code is a server response to a browser’s request. When you visit a website, your browser sends a request to the site’s server, and the server then responds to the browser’s request with a three-digit code: the HTTP status code.

These status codes are the Internet equivalent of a conversation between your browser and the server. They communicate whether things between the two are A-okay, touch-and-go, or whether something is wrong. Understanding status codes and how to use them will help you to diagnose site errors quickly to minimize downtime on your site. You can even use some of these status codes to help search engines and people access your site; a 301 redirect, for example, will tell bots and people that a page that has moved somewhere else permanently.

The first digit of each three-digit status code begins with one of five numbers, 1 through 5; you may see this expressed as 1xx or 5xx to indicate status codes in that range. Each of those ranges encompasses a different class of server response.

Common HTTP status code classes:

1xxs – Informational responses: The server is thinking through the request.

2xxs – Success! The request was successfully completed and the server gave the browser the expected response.

3xxs – Redirection: You got redirected somewhere else. The request was received, but there’s a redirect of some kind.

4xxs – Client errors: Page not found. The site or page couldn’t be reached. (The request was made, but the page isn’t valid — this is an error on the website’s side of the conversation and often appears when a page doesn’t exist on the site.)

5xxs – Server errors: Failure. A valid request was made by the client but the server failed to complete the request.

The most important HTTP status codes

1xx (Informational):

100 Continue
101 Switching Protocols
102 Processing
103 Early Hints

2xx (Successful):

200 OK
201 Created
202 Accepted

3xx (Redirection):

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

4xx (Client Error):

400 Bad Request
401 Unauthorized
402 Payment Required
403 Forbidden
404 Not Found
406 Not Acceptable
410 Gone

5xx (Server Error):

500 Internal Server Error
502 Bad Gateway
503 Service Unavailable
504 Gateway Timeout

1XX HTTP Status Codes

This category is informational, temporary, and invisible to the client. It indicates the server received the request and will proceed with it.

100 — Continue: This interim status code means the server received the initial request, and the client should continue.

101 — Switching protocols: This code is a response to an Upgrade header field request and states the protocol the server will switch to.

102 — Processing: This response indicates the server received and is processing the request, but no response is yet available.

103 — Early hints: This code is used with the Link header and allows the browser to preload resources while the server prepares a response.

2XX HTTP Status Codes

This status code category encompasses successful responses.

200 — OK: This is the standard response for successful HTTP requests. The actual meaning of the response depends on the request method used:

GET: Resource obtained and is in the message body
HEAD: Headers are included in the response
POST or PUT: Resource describing the result of the action sent is in the message body
TRACE: Message body contains the request message as received by the server

201 — Created: The request succeeded and a new resource was created. This is usually the response after POST or PUT requests.

202 — Accepted: The request was accepted but is still in progress. It’s used for cases where another server handles the request or for batch processing.

3XX HTTP Status Codes

The status codes in this category show the resource is in a different location, and the user gets redirected as a result.

300 — Multiple Choice: The request has more than one possible response. And the user should choose one of them.

301 — Moved Permanently: This redirect status code indicates the requested resource has permanently moved to a new URL. The browser displays the new URL.

302 — Found: Previously known as “Moved Temporarily,” this code indicates the requested resource has temporarily moved to a new URL.

303 — See Other: The server redirects the user to the requested resource with a GET request at another URL.

304 — Not Modified: Used for caching purposes. The response hasn’t been modified, so the client can continue to use the same cached version of the requested resource.

307 — Temporary Redirect: The requested resource temporarily moved to a different URL. The only difference vis-a-vis the 302 code is the user must not change the HTTP method used.

4XX HTTP Status Codes

This category indicates the server can’t reach a page due to an error on the client side.

400 — Bad Request: The server can’t or won’t process the request due to a client error. For example, invalid request message framing, deceptive request routing, size too large, etc.

401 — Unauthorized: The user doesn’t have valid authentication credentials to get the requested resource.

402 — Payment Required: Reserved for future use; it was initially intended for digital payment systems. It’s very rarely used, and no standard convention regulates it.

403 — Forbidden: The client doesn’t have access rights to the content. For example, it may require a password. Unlike the 401 HTTP error code, the server does know the client’s identity.

404 — Not Found: The server can’t find the requested resource, and no redirection has been set. 404 errors can harm your SEO efforts.

406 — Not Acceptable: The server doesn’t find any content that satisfies the criteria given by the user according to the Accept headers requested.

410 — Gone: The content requested has been permanently deleted from the server and will not be reinstated.

5XX HTTP Status Codes

This category includes errors on the server side.

500 — Internal Server Error: The server has encountered an unexpected error and cannot complete the request.

502 — Bad Gateway: The server acts as a gateway and gets an invalid response from an inbound host.

503 — Service Unavailable: The server is unable to process the request. This often occurs when a server is overloaded or down for maintenance.

504 — Gateway Timeout: The server was acting as a gateway or proxy and timed out, waiting for a response.