What Is HTTP Status Code?
An HTTP status code is a three-digit number a server returns in its response to signal the outcome of a request. Codes are grouped into five classes by their first digit — 1xx informational, 2xx success, 3xx redirection, 4xx client error, and 5xx server error — and are defined by RFC 9110 and registered by IANA.
- Status codes fall into five classes by first digit: 1xx informational, 2xx success, 3xx redirection, 4xx client error, and 5xx server error.
- The codes and their meanings are standardized in RFC 9110 (HTTP Semantics) and catalogued in the official IANA HTTP Status Code Registry.
- The codes that matter most for SEO are 200 (OK), 301 and 302 (redirects), 404 (Not Found), and 5xx server errors, because they decide whether a page can be crawled and indexed.
- Search crawlers act on the numeric code, not the page’s visible content — a page that looks fine to a human but returns a 404 or 5xx will still be treated as unavailable.
How an HTTP Status Code Works
Every time a browser or crawler asks a server for a resource, the server’s response opens with a status line, and the heart of that line is a three-digit number: the HTTP status code. It is the server’s one-word verdict on what happened — did the request succeed, does the resource live somewhere else now, was the request malformed, did the server break. Clients read this code before they read anything else, and they act on it. A browser follows a redirect code, renders a success code, and shows an error page for a failure code, all driven by those three digits.
The first digit sorts every code into one of five classes, defined in RFC 9110 (HTTP Semantics) and catalogued in the official IANA HTTP Status Code Registry:
- 1xx — Informational. The request was received and processing continues (for example 100 Continue, 103 Early Hints).
- 2xx — Success. The request succeeded (200 OK, 201 Created, 204 No Content).
- 3xx — Redirection. Further action is needed to complete the request (301 Moved Permanently, 302 Found, 304 Not Modified, 307, 308).
- 4xx — Client error. The request was faulty or unauthorized (400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 429 Too Many Requests).
- 5xx — Server error. The server failed to fulfill a valid request (500 Internal Server Error, 502 Bad Gateway, 503 Service Unavailable, 504 Gateway Timeout).
Because the code is standardized, every client interprets it the same way. That shared meaning is what lets a crawler in a data center and a browser on a phone both know, from a single number, whether a URL is alive.
The Status Codes That Matter for SEO
A search crawler cares about a small, high-stakes subset of the registry, because these codes decide whether a page can enter the index at all:
- 200 OK — the page is live and served normally. This is the baseline state for any URL you want indexed and ranked.
- 301 Moved Permanently and 302 Found — the permanent and temporary redirects. Google treats permanent redirects as a canonicalization signal that moves ranking signals to the destination; temporary ones keep the original URL indexed.
- 304 Not Modified — tells a crawler the page is unchanged since it last fetched it, saving crawl budget.
- 404 Not Found — the page does not exist. Legitimate for retired URLs, but a surprise 404 on a page you want indexed silently removes it from search.
- 5xx server errors — signal that the server itself failed. Repeated 5xx responses tell Google the site is unhealthy and can slow crawling of the whole domain.
The crucial rule underneath all of these: crawlers act on the code, not on the rendered page. A URL that displays a beautiful article but returns a 404 or 500 in its header is treated as unavailable, and a missing page that returns a 200 with “sorry, not found” text becomes a soft 404 — an empty page that crawlers may index by mistake.
Example of an HTTP Status Code
A single real response makes the mechanism concrete. When an old MDN documentation URL is requested, the server does not return the page; it returns a redirection status code, per MDN’s own HTTP reference:
HTTP/2 301
cache-control: max-age=2592000,public
location: /en-US/docs/Learn_web_development/Core/Scripting/Network_requests
content-type: text/plain; charset=utf-8
The status line HTTP/2 301 is the entire message in miniature. The 301 says “moved permanently” — a 3xx redirection code — and the client immediately knows, without parsing any page body, that it must go to the address in the location header instead. Had the same request returned 200, the client would have rendered the content in place; had it returned 404, the client would have shown a not-found page and a crawler would have dropped the URL from its index. Same request, three different three-digit numbers, three completely different outcomes. That is the whole role of an HTTP status code: it is the compact, standardized instruction that tells every client what to do next, and for search engines it is the gatekeeper that decides whether a URL ever reaches the index.
The trap with status codes is assuming the crawler sees what the visitor sees. It doesn’t — it reads the header first, and the header wins. I regularly find pages that render a perfectly good article in the browser while the server quietly returns a 404 or a 5xx in the response line. To a human it’s a working page; to Googlebot it’s a dead one, and it won’t be indexed no matter how good the content is. The reverse bites too: a “soft 404,” where a missing page returns a 200 with a friendly “not found” message, tricks crawlers into indexing an empty page. Before you debate content or links, confirm the status code is telling the truth about the page. Everything downstream depends on that one number.
Frequently Asked Questions
What are the five classes of HTTP status codes?
Which HTTP status codes matter most for SEO?
Do HTTP status codes affect Google rankings?
What is a soft 404?
The Bottom Line
An HTTP status code is the one number that tells everyone — browser, crawler, monitoring tool — how a request turned out, sorted into five families by its leading digit and standardized by RFC 9110 and the IANA registry. For search, a handful of these codes are load-bearing: they decide whether a page is served, redirected, or declared missing, and crawlers trust the code over whatever the page appears to show. Get the code right and everything else about a URL becomes possible.
Sources
- HTTP response status codes — MDN Web Docs
- How Google handles redirects for Search — Google Search Central
Roborank crawls every URL on your site and surfaces the status codes that block indexing — stray 404s, 5xx errors, soft 404s, and misrouted redirects — in one report.
Check your status codes →Rank & Cash — the weekly SEO breakdown
One practical teardown a week on ranking in search and getting cited by AI. No fluff.
