HTTP Status Codes
What is an HTTP status code?
An HTTP status code is a three-digit number that a web server sends back to a browser or client in response to every request. It is the server’s way of communicating the outcome of the request, whether it succeeded, failed, needs to go somewhere else, or ran into a problem, before any page content is delivered.
Every time you visit a website, click a link, submit a form, or load an image, your browser sends an HTTP request to a server. The server processes that request and responds with a status code alongside whatever content, or error, it is returning. Most of the time this happens invisibly in the background. You see the page load and never think about the status code behind it. But when something goes wrong, a page is missing, a server crashes, a redirect sends you somewhere unexpected, status codes are the mechanism that explains what happened.
Understanding HTTP status codes is fundamental to managing URL redirects, diagnosing site problems, optimising for search engines, and building reliable web infrastructure.
How HTTP status codes work
HTTP, Hypertext Transfer Protocol, is the foundation of data communication on the web. Every exchange between a browser and a server follows the same pattern: the browser sends a request, the server sends a response. The response always begins with a status line containing the HTTP version, the status code, and a short reason phrase.
A typical response looks like this:
Or in the case of a redirect:
The status code is the most important part of this exchange for browsers, crawlers, and applications. It tells the client exactly what happened and what to do next, render the page, follow a redirect, display an error, or retry the request.
The five classes of HTTP status codes
HTTP status codes are grouped into five classes, each identified by the first digit of the three-digit code. Understanding which class a code belongs to immediately tells you the nature of the response even if you do not know the specific code.
1xx Informational
1xx codes indicate that the server has received the request and is continuing to process it. They are provisional responses sent before the final response. In practice, 1xx codes are rarely visible to end users and are primarily used in technical communication between clients and servers during complex request flows.
The most notable 1xx code is 100 Continue, which tells the client to proceed with sending the rest of a large request body after the server has reviewed the initial headers and confirmed it is willing to accept it.
2xx Success
2xx codes indicate that the request was successfully received, understood, and accepted. These are the responses you want to see on live, indexable content.
The most important 2xx code is 200 OK, the standard response for a successful request. A page returning a 200 is live, accessible, and indexable by search engines. Other notable 2xx codes include 201 Created, returned after successfully creating a new resource, and 204 No Content, returned when a request succeeded but there is no content to return in the response body.
3xx Redirection
3xx codes indicate that the client needs to take additional action to complete the request, typically following a redirect to a different URL. These are the status codes at the heart of redirect management.
The 3xx family includes the full set of redirect codes: 301 Moved Permanently, 302 Found, 303 See Other, 304 Not Modified, 307 Temporary Redirect, and 308 Permanent Redirect. Each communicates a different combination of permanence, method handling, and caching behaviour. Understanding the differences between them is one of the most important aspects of effective redirect management and SEO.
4xx Client Errors
4xx codes indicate that the request could not be fulfilled because of a problem with the request itself. The server received and understood the request but could not or would not process it as submitted.
The most widely recognised 4xx code is 404 Not Found, the page does not exist at the requested URL. Other important 4xx codes include 410 Gone, which signals permanent content removal, 401 Unauthorized, which requires authentication before access is granted, 403 Forbidden, which means the server refuses to fulfil the request regardless of authentication, and 429 Too Many Requests, which signals rate limiting.
5xx Server Errors
5xx codes indicate that the server encountered a condition that prevented it from fulfilling an otherwise valid request. Unlike 4xx errors where the problem is with the request, 5xx errors mean the server itself is the problem.
The most common 5xx codes are 500 Internal Server Error, the generic catch-all for unexpected server failures, 503 Service Unavailable, which signals temporary downtime, and 508 Loop Detected, which signals a circular processing loop. 502 Bad Gateway and 504 Gateway Timeout are common in proxied and load-balanced infrastructure where upstream servers become unavailable.
HTTP status codes and SEO
Status codes are one of the most direct signals a website sends to search engines. Every URL that Googlebot crawls returns a status code, and that code shapes how the URL is treated in the index.
200: the URL is live and indexable. Search engines crawl the content and include the URL in their index normally.
301: the URL has moved permanently. Search engines update their index to replace the old URL with the destination, and transfer SEO equity and link juice to the new URL over time.
302: the URL has moved temporarily. Search engines keep the original URL in the index and do not transfer SEO equity to the destination.
404: the URL does not exist. Search engines eventually remove it from the index. Any link juice pointing to a 404 URL is lost.
410: the URL has been permanently removed. Search engines remove it from the index faster than a 404.
500: the server failed. Search engines retry the URL and are forgiving of brief 500s, but persistent 500s lead to de-indexing.
503: the server is temporarily unavailable. Search engines treat this as temporary downtime and are patient as long as it does not persist for too long.
Monitoring the status codes returned by your URLs, and ensuring they match the intended behaviour, is one of the most fundamental aspects of technical SEO.
HTTP status codes and redirect management
Status codes are inseparable from redirect management. The 3xx redirect class exists specifically to communicate URL changes to browsers and search engines, and choosing the right code within that class has real consequences.
Using a 302 instead of a 301 for a permanent move means SEO equity never transfers to the new URL. Using a 301 instead of a 307 in an API context means POST requests lose their method and body through the redirect. Using a 308 when a 307 was intended locks browsers into a cached permanent redirect that is difficult to reverse.
Every redirect you set up is a status code choice. Getting that choice right, matching the code to the intent, is what separates effective redirect management from redirect configurations that quietly damage SEO and break application behaviour.
HTTP status codes and crawl budget
Every HTTP response, whether a 200, a redirect, an error, or anything else, consumes crawl budget. Search engine crawlers allocate a finite amount of crawling activity to each site, and responses that waste that budget (redirect chains, 404 errors, redirect loops, persistent 500s) reduce how much of it is spent on live, indexable content.
Keeping your status code profile clean, minimising 4xx errors, resolving 5xx errors quickly, collapsing redirect chains to single hops, and removing defunct URLs from internal linking, is one of the most effective ways to ensure crawlers spend their budget on pages that matter.
How to check HTTP status codes
HTTP status codes are visible through several tools depending on the level of detail needed.
Browser developer tools: the Network tab shows the status code for every request made when loading a page, including the main document, images, scripts, and any redirects. This is the most accessible way to inspect status codes without additional tools.
curl: the command line tool
curl -I https://example.comreturns only the response headers including the status code, making it a quick and reliable way to check any URL from the terminal.Google Search Console: the Coverage report in Search Console surfaces status code issues that Googlebot has encountered across your site, including 404 errors, soft 404s, server errors, and redirect issues.
Dedicated crawl tools: site auditing and crawl tools check status codes across an entire site systematically, identifying patterns of errors, redirect chains, and other issues at scale that would be impractical to find manually.
Server logs: the most complete source of status code data. Server logs record every request and response including status codes, making it possible to identify patterns, diagnose problems, and track changes over time.
HTTP status codes quick reference
Code | Name | Class | Meaning |
|---|---|---|---|
200 | OK | 2xx Success | Request succeeded, content returned |
201 | Created | 2xx Success | Resource created successfully |
301 | Moved Permanently | 3xx Redirect | Permanent redirect, SEO equity transfers |
302 | Found | 3xx Redirect | Temporary redirect, original URL kept |
303 | See Other | 3xx Redirect | Redirect to GET, used after POST |
304 | Not Modified | 3xx Redirect | Use cached version, content unchanged |
307 | Temporary Redirect | 3xx Redirect | Temporary, method preserved |
308 | Permanent Redirect | 3xx Redirect | Permanent, method preserved |
400 | Bad Request | 4xx Client Error | Request malformed or invalid |
401 | Unauthorized | 4xx Client Error | Authentication required |
403 | Forbidden | 4xx Client Error | Access denied |
404 | Not Found | 4xx Client Error | Page does not exist |
410 | Gone | 4xx Client Error | Content permanently removed |
429 | Too Many Requests | 4xx Client Error | Rate limit exceeded |
500 | Internal Server Error | 5xx Server Error | Unexpected server failure |
503 | Service Unavailable | 5xx Server Error | Server temporarily unavailable |
508 | Loop Detected | 5xx Server Error | Infinite loop detected |