Skip to main content

What is an HTTP status code?

An HTTP status code is a three-digit code that a web server returns in answer to every request from a browser or a crawler. The HTTP status code signals whether the request succeeded, was redirected or failed. The first digit assigns every code to one of five classes (1xx to 5xx). For SEO the codes 200, 301, 302, 304, 404, 410 and 503 matter most, because they control how Google crawls and indexes pages.

HTTP status code explained: the three-digit server signals 200, 301, 404 and 503 for requests on the web

Every call to a web page triggers a request to a server in the background. The server answers with an HTTP status code before the actual content is transferred. For visitors that code usually stays invisible. For search engines it is the central signal for whether a page can be retrieved and belongs in the index. The codes are defined identically for crawlers and browsers in the RFC 9110 standard.

HTTP status code at a glance

Property Detail
Word class noun (an HTTP status code), also written HTTP status code or shortened to status code
Abbreviation HTTP = Hypertext Transfer Protocol
Pronunciation “aitch-tee-tee-pee STAY-tus code”
Standard RFC 9110 (HTTP Semantics), previously RFC 7231 and RFC 2616
Structure three-digit number (100 to 599) plus an optional reason phrase, for example “200 OK”
Related terms redirect, 301 redirect, canonical, crawling, indexing

How is an HTTP status code structured?

An HTTP status code consists of a three-digit number and a short piece of plain text, the so-called reason phrase. The number sits between 100 and 599, and the first digit sets the class. The status code stands in the first line of the server answer, the status line, ahead of all headers and the actual content.

A typical successful server answer looks like this in raw form:

HTTP/1.1 200 OK
Content-Type: text/html; charset=UTF-8
Content-Length: 3271
Cache-Control: max-age=3600

For a redirect the server also names the target in the Location header:

HTTP/1.1 301 Moved Permanently
Location: https://example.com/new-page/

The reason phrase (OK, Not Found, Moved Permanently) only exists to make the answer readable for humans. Search engines and browsers evaluate the three-digit number alone. Wrong text with a correct number therefore changes nothing, while a wrong number changes everything.

Request and response: how an HTTP status code is createdThe browser sends a request to the server. The server answers with an HTTP status code such as 200 OK, which signals whether the request succeeded.Browser / Crawlersends the requestWeb serverreturns the status codeGET /page/200 OKThe status code sits in the first line of the response.The first digit (2xx) reveals the class: success in this case.Fig. 1 · taismo
Fig. 1: Request and response, how an HTTP status code travels between browser and server.

Which status code classes are there?

There are 5 classes of HTTP status codes, sorted by the first digit. Every class stands for one kind of answer: information, success, redirect, client error or server error.

Class Meaning Typical codes
1xx Informational: the request is running, the server keeps the process open 100 Continue, 101 Switching Protocols
2xx Success: the request was understood and answered 200 OK, 201 Created, 204 No Content
3xx Redirect: the resource sits somewhere else, the client should be forwarded 301, 302, 304, 307, 308
4xx Client error: the request is faulty or the resource is missing 400, 401, 403, 404, 410, 429
5xx Server error: the server cannot answer a valid request 500, 502, 503, 504

The first digit is enough for a rough classification: everything in the 2xx range is good, 3xx means redirect, 4xx and 5xx are errors. The second and third digit refine the statement inside the class.

The five classes of HTTP status codesHTTP status codes fall into five classes: 1xx informational, 2xx success, 3xx redirect, 4xx client error and 5xx server error. The first digit determines the class.5 classes: the first digit decides1xxInformationalRequest still in progress2xxSuccessPage delivered: 200 OK3xxRedirectResource has moved: 3014xxClient errorPage missing: 404, 4105xxServer errorServer overloaded: 503Fig. 2 · taismo
Fig. 2: The five classes of HTTP status codes. The first digit determines the meaning.

Which HTTP status codes matter for SEO?

For SEO, 7 status codes are especially relevant, because they directly control how Google crawls, rates and indexes a page. A wrong code can throw a whole page out of the index or waste link equity.

Code Meaning SEO relevance
200 OK: page delivered successfully Mandatory for every indexable page. Only 200 pages belong in the index.
301 Moved Permanently: permanent redirect Passes link equity to the target. First choice for URL changes and domain moves.
302 Found: temporary redirect Only for short-term redirects. Keeps the original URL in the index.
304 Not Modified: content unchanged Saves crawl resources, because Google uses the cached version.
404 Not Found: page does not exist Normal for deleted pages. Google drops 404 URLs from the index over time.
410 Gone: page permanently removed A clearer signal than 404. Google deindexes 410 URLs faster.
503 Service Unavailable: temporarily unreachable The right signal during maintenance. Google tries again later instead of deindexing.

Status code 200 is the normal case. Every page that is meant to rank has to return 200 when it is requested. If an important URL accidentally serves 404 or 500, it disappears from the search results.

During a move, the difference between 301 and 302 decides what happens to your link equity. A 301 redirect is permanent and transfers the ranking signals from the old URL to the new one. A 302 signals “only temporary” and leaves the old URL in the index. Replacing a URL for good but setting a 302 gives away visibility you have already built.

For deleted content, 404 and 410 are equally legitimate. 410 (Gone) is the more decisive signal and in practice often leads to faster deindexing. One thing matters: a deleted page must not quietly return 200 (a so-called soft 404), otherwise Google keeps treating it as valid.

For planned maintenance, 503 is mandatory. The code tells Google “come back later” and prevents a page that is briefly offline from being deindexed. If you want to keep a page out of the index with the robots.txt or the X-Robots-Tag instead of a status code, you are working on a different level: the status code controls availability, while robots.txt and the X-Robots-Tag control crawling and indexing.

How do you check HTTP status codes?

HTTP status codes can be read out directly with a handful of tools. For single URLs the browser is enough, for a whole website you need a crawler.

  • Browser developer tools: the “Network” tab shows the status code for every loaded resource. The fastest way for a single page.
  • Command line with curl: one command reads the headers together with the status code, ideal for following redirect chains.
  • Crawlers such as Screaming Frog: check thousands of URLs at once and list every 3xx, 4xx and 5xx code on a website.
  • Google Search Console: the “Pages” report shows which URLs Google crawled with which status and why they are not indexed.

On the command line, this curl command reads the headers only and follows every redirect on the way:

curl -sIL https://example.com/old-page/ | grep -i "^HTTP"

The output shows every stop of a chain, for example HTTP/1.1 301 followed by HTTP/1.1 200. Long redirect chains and accidental loops become visible immediately. A systematic check of all status codes is part of every technical SEO audit, because wrong codes are among the most common and at the same time most easily fixed crawling problems.

Frequently asked questions about HTTP status codes

What does status code 200 mean?
200 OK means that the request succeeded and the server delivers the page normally. Every page that is meant to enter the Google index has to return code 200 when it is requested.

Is a 404 error bad for SEO?
No, a 404 for pages that really have been deleted is normal and correct. It only becomes a problem when important or linked URLs return 404 by accident, because then visibility is lost.

What is the difference between 301 and 302?
301 is a permanent redirect and transfers link equity to the target page. 302 is temporary and keeps the original URL in the index. For permanent moves, 301 is the right choice.

Which status code applies during maintenance?
503 Service Unavailable is the correct code for planned maintenance. It tells Google that the page is only temporarily unreachable and prevents deindexing.

0%