webmasterhelper

Protocol · 8 minute read

HTTP status codes, and what search engines do with them

The status line is the first thing a crawler, a CDN and a browser all agree to read. Getting it wrong is how a working site becomes an invisible one.

The ones that decide whether a page is indexed

CodeMeaningWhat a search engine does with it
200OKIndexes the body. Returning 200 for a page that is really an error is a soft 404 — the worst of both worlds, because the error is indexable and invisible in your logs.
301Moved PermanentlyFollows it and consolidates signals onto the target. The correct choice for a permanent move; cached aggressively by browsers, so test before deploying.
302FoundFollows it but keeps the original URL as canonical. Use only when the redirect really is temporary.
304Not ModifiedTreats the cached copy as current. Served in response to If-None-Match or If-Modified-Since; carries no body, which is the point.
307Temporary RedirectLike 302 but the method and body must be preserved. This is what an HSTS preload redirect reports internally.
308Permanent RedirectLike 301 but preserves the method. Safe for permanent redirects of POST endpoints.
404Not FoundDrops the URL from the index after repeated visits. Normal and healthy for genuinely missing pages.
410GoneTreated as a stronger, deliberate 404 — typically dropped faster. Use it when you removed something on purpose.
451Unavailable For Legal ReasonsNo index. Used for legal blocks and, in practice, by some hosts for suspended accounts.
503Service UnavailableRetries later and keeps the URL. The right answer during planned maintenance — add Retry-After.

1xx — informational

CodeMeaningNotes
100ContinueResponse to an Expect: 100-continue request header, before a large body is sent.
101Switching ProtocolsThe WebSocket upgrade handshake.
103Early HintsLets the server send Link: rel=preload headers before the real response. Supported by Chrome and by Cloudflare; a genuine win for render-blocking assets.

2xx — success

CodeMeaningNotes
200OKThe default.
201CreatedA POST made a resource. Should carry a Location header pointing at it.
202AcceptedQueued, not finished. Common for async jobs.
204No ContentSuccess with nothing to return. Useful for beacons and DELETE.
206Partial ContentA range request succeeded — video seeking and resumable downloads depend on it.

3xx — redirection

CodeMeaningNotes
300Multiple ChoicesRare in practice.
301Moved PermanentlyMay be rewritten to GET by clients. Cached by browsers, sometimes indefinitely.
302FoundTemporary. Also often rewritten to GET.
303See OtherExplicitly "GET this instead" — the POST/redirect/GET pattern.
304Not ModifiedMust not include a body. Must include the validators that justify it.
307Temporary RedirectMethod and body preserved.
308Permanent RedirectMethod and body preserved.

4xx — client errors

CodeMeaningNotes
400Bad RequestMalformed syntax. Often a proxy rejecting an oversized header.
401UnauthorizedMeans unauthenticated. Must include WWW-Authenticate.
403ForbiddenAuthenticated but not permitted — or, on a static server, a filesystem permission problem or a missing index file.
404Not FoundServe a useful page with it, but keep the status 404.
405Method Not AllowedMust include an Allow header listing what is permitted.
406Not AcceptableNo representation matched the Accept headers.
408Request TimeoutThe client was too slow. Often a dropped mobile connection.
409ConflictThe request conflicts with current state — a version mismatch, for instance.
410GoneDeliberately removed and not coming back.
412Precondition FailedAn If-Match condition did not hold. The basis of optimistic locking.
413Content Too LargeIn nginx, raise client_max_body_size; the default is 1 MB, which breaks most file uploads.
414URI Too LongUsually a GET that should have been a POST.
415Unsupported Media TypeWrong Content-Type on the request.
418I'm a TeapotA joke from RFC 2324 that is now permanently reserved because too many people use it.
422Unprocessable ContentSyntactically valid, semantically wrong. The usual choice for form validation failures in APIs.
429Too Many RequestsRate limited. Include Retry-After — crawlers honour it and will back off instead of giving up.
431Request Header Fields Too LargeAlmost always oversized cookies.
451Unavailable For Legal ReasonsLegal blocking.

5xx — server errors

CodeMeaningNotes
500Internal Server ErrorThe application threw. The detail is in your error log, never in the response.
501Not ImplementedThe method is unrecognised by the server.
502Bad GatewayThe proxy got an invalid response from upstream — usually the application process is not running or is listening on a different port.
503Service UnavailableOverloaded or down for maintenance. The only 5xx a crawler treats as temporary by design.
504Gateway TimeoutUpstream was too slow. In nginx, proxy_read_timeout — but raising it hides the real problem.
508Loop DetectedCommon on shared hosting when a redirect rule recurses.