DomainLens

Learn

HTTP Status Codes for SEO: What Google Does With Each One

A status code is the first thing a crawler reads and the only part of the response it cannot ignore. Sending the wrong one overrides everything the page says about itself.

Check your site before you start fixing

Run a fresh DomainLens audit and use the report as your priority list.

Run a free SEO audit

The codes that matter for search

Everything else in the specification exists and rarely matters here. These ten cover essentially every SEO conversation about status codes.

CodeMeansWhat Google does
200Here is the pageIndexes it, if allowed
301Moved permanentlyConsolidates onto the new URL
302 / 307Moved temporarilyKeeps the original indexed
304Not modifiedUses its cached copy
403ForbiddenCannot access; eventually drops it
404Not foundRetries, then drops it
410Gone for goodDrops it faster than 404
429Too many requestsSlows crawling
500Server errorRetries; sustained errors drop pages
503Temporarily unavailableComes back later — the right maintenance code

301 versus 302, and why the default is wrong

A 301 says the move is permanent, so Google consolidates the old URL's signals onto the new one and eventually drops the old address. A 302 says the original will return, so Google keeps it indexed and waits.

Nearly every framework sends 302 unless told otherwise. That makes "we redirected it and nothing consolidated" one of the most common findings in an audit — the redirect works perfectly for users and says the opposite of what was intended to Google.

404 versus 410

Both remove a page. 404 means "not found here, right now", so Google retries occasionally before giving up. 410 means "this existed and is deliberately gone", and Google drops it faster.

The practical difference is small — days rather than weeks — but 410 is the honest answer when you deleted something on purpose, and it stops the recrawls sooner.

  • A 404 for a URL that never existed is correct and needs no action.
  • A 404 on a page that should exist is a bug, not a status-code question.
  • Use 410 when you deliberately removed content that is not coming back.
  • Never return 200 with a "page not found" message — that is a soft 404.

Codes people use incorrectly

The first row is the expensive one. Any framework that renders a not-found view inside a 200 response is producing soft 404s at every typo and stale link — see soft 404 errors .

MistakeWhy it is wrongInstead
200 on a "not found" pageGoogle indexes an unbounded set of shells404 or 410
302 for a permanent moveOld URL stays indexed, signals split301
500 during maintenanceReads as a broken site503 with Retry-After
403 for removed contentSuggests access control, not deletion410
301 to the home page en masseTreated as a soft 404404, or redirect to a real equivalent
404 on a page under constructionDiscourages recrawl503, or publish it

Checking what you actually send

Check from outside your network and with a cold cache. A CDN can return a cached 200 for a URL your origin now 404s, and the browser will show you the cached one.

Reading the status line
# One URL
curl -sI https://example.com/page | head -n 1

# Follow a redirect chain and show every hop
curl -sIL https://example.com/old-page \
  | grep -Ei '^(HTTP|location)'

# Final code and destination only
curl -sIL https://example.com/old-page \
  -o /dev/null -w '%{http_code} %{url_effective}\n'

# Does a nonexistent path return 404?
curl -sI https://example.com/definitely-not-real | head -n 1

How DomainLens contributes

DomainLens reports the status code and the full redirect chain for every URL it audits, so a 302 that should be a 301 or a soft 404 returning 200 surfaces without manual checking. Trace any single URL with the redirect checker , and see redirect chains for collapsing the long ones.

Is 301 or 302 better for SEO?
301 for a permanent move, because it consolidates the old URL onto the new one. 302 keeps the original indexed, which is correct only when the move is genuinely temporary.
What is the difference between 404 and 410?
Both remove the page. 410 states the removal was deliberate and permanent, so Google stops retrying sooner. Use it when you deleted something on purpose.
What status code should I use for maintenance?
503 with a Retry-After header. It tells Google the outage is temporary and protects the index in a way a 500 does not.
Do 404s hurt SEO?
No. They are the correct answer for a URL that does not exist. What hurts is a 404 on a page that should exist, or a 200 on one that should not.

Check this on your own site

Related resources