HTTP Status Codes for SEO: 301 vs 302 vs 307 vs 308 (and When Each Wins)

Misusing HTTP status codes is one of the most common technical-SEO mistakes — and the consequences are silent. A 302 where a 301 belongs leaks link equity for months without an obvious symptom. Here's the SEO-correct use for every status code that affects search.

Table of contents

1. The codes Google actually uses for SEO · 2. 301 vs 302: the only choice that really matters · 3. 307 and 308: when to use the modern variants · 4. 404 vs 410: stronger than you think · 5. 451 and 503: the legitimate non-200 codes · 6. The redirect-chain trap · 7. FAQ

Which status codes actually matter for SEO?

200 (OK — indexable), 301 (permanent redirect — passes link equity), 302 (temporary redirect — ambiguous signal), 304 (not modified — informs crawl freshness), 307/308 (modern method-preserving variants), 404 (not found — drops from index over time), 410 (gone — drops faster), 451 (legally unavailable), 503 (service unavailable — temporary). Other codes either don't affect SEO or are edge cases.

301 vs 302: the only choice that really matters

Use 301 (permanent) for: page rename/move, HTTPS migration, www-to-non-www, domain change, legacy URL consolidation. Use 302 (temporary) for: A/B tests, geo-redirects, short-lived promo pages reverting later. **Google treats long-running 302s as 301s after ~6–12 months, but link equity transfers slower and indexation lags during the ambiguity window.** When in doubt, use 301.

307 and 308: when to use the modern variants

307 = temporary, method-preserving (POST stays POST). 308 = permanent, method-preserving. Use 308 instead of 301 in modern API-heavy contexts where the original method matters; use 301 for content-page redirects where simplicity wins. For pure content SEO, 301 remains the safest default — fully understood by all crawlers.

404 vs 410: stronger than you think

404 (not found): Google retries the URL periodically and only drops from index after sustained absence (weeks to months). 410 (gone): Google drops from index much faster — typically within days. **Use 410 for permanently removed content (deleted articles, sunset products) to clean indexation faster.** Use 404 for genuine 'might come back' uncertainty.

451 and 503: the legitimate non-200 codes

451 (legally unavailable): correct for content removed for legal/regulatory reasons (DMCA, GDPR forget request). 503 (service unavailable): correct for planned maintenance (use Retry-After header). 503 should never persist >24h — Google starts deindexing after extended unavailability. Misuse: returning 200 with 'page unavailable' content (catastrophic — indexed as thin content).

The redirect-chain trap

Each redirect in a chain loses ~10% of link equity per hop and slows crawl. **Chains of 3+ redirects are demonstrably harmful; chains of 5+ often break Googlebot's crawl entirely.** Audit with Screaming Frog's redirect chains report; flatten by pointing all intermediate URLs directly to the final destination. Common offender: HTTPS migration combined with subsequent URL renames creating http://old → https://old → https://new chains.

Frequently Asked Questions

Does Google preserve link equity through 301 redirects?

Yes — fully, since the 'no PageRank loss on 301' confirmation in 2016. The remaining loss is from chains and from very long-running 302s being treated ambiguously.

How long should I keep 301 redirects in place?

Forever, ideally. Removing a 301 reverts the URL to 404, dropping accumulated link equity. The cost of keeping 301s is near-zero; the cost of removing them is permanent equity loss.

Are JavaScript redirects (window.location) treated as 301s?

Treated as redirects but with significant lag — Googlebot has to render the page first. Always prefer server-side 301s for SEO; use JS redirects only when server-side isn't available.

Does soft 404 hurt SEO?

Yes — pages returning 200 but appearing to be 'not found' (empty results, error messages) get classified as soft 404s in Search Console and excluded from index. Always return real 404 status when content is missing.

Should I redirect HTTPS to HTTP if SSL expires?

No — fix SSL immediately. HTTPS → HTTP redirects in modern browsers fail with security errors and tank both UX and rankings. SSL is non-optional in 2026.