Aprender
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.
Ejecuta una auditoría nueva en DomainLens y usa el informe como lista de prioridades.
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.
| Code | Means | What Google does |
|---|---|---|
| 200 | Here is the page | Indexes it, if allowed |
| 301 | Moved permanently | Consolidates onto the new URL |
| 302 / 307 | Moved temporarily | Keeps the original indexed |
| 304 | Not modified | Uses its cached copy |
| 403 | Forbidden | Cannot access; eventually drops it |
| 404 | Not found | Retries, then drops it |
| 410 | Gone for good | Drops it faster than 404 |
| 429 | Too many requests | Slows crawling |
| 500 | Server error | Retries; sustained errors drop pages |
| 503 | Temporarily unavailable | Comes 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 .
| Mistake | Why it is wrong | Instead |
|---|---|---|
| 200 on a "not found" page | Google indexes an unbounded set of shells | 404 or 410 |
| 302 for a permanent move | Old URL stays indexed, signals split | 301 |
| 500 during maintenance | Reads as a broken site | 503 with Retry-After |
| 403 for removed content | Suggests access control, not deletion | 410 |
| 301 to the home page en masse | Treated as a soft 404 | 404, or redirect to a real equivalent |
| 404 on a page under construction | Discourages recrawl | 503, 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.
# 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.