DevKits
Concept

HTTP Redirects Explained — 301 vs 302 vs 307 vs 308 (Permanent & Temporary)

HTTP 301, 302, 303, 307, and 308 all redirect the browser, but they differ in permanence and whether the HTTP method (POST/GET) is preserved. This guide explains when each code applies, the link-equity impact on SEO, and common missteps.

Last updated:

Core Concepts

301 Moved Permanently — the SEO redirect
301 tells search engines to transfer link equity (PageRank) to the new URL permanently. Use 301 for canonical URL changes: HTTP→HTTPS upgrades, www→apex consolidation, and permanent URL restructures. Search engines cache 301 mappings aggressively — once indexed, old URLs disappear from SERPs. Do NOT use 301 for temporary A/B tests or holiday landing pages.
302 Found — the historical ambiguity
302 is the original 'temporary redirect.' The spec is unclear about method preservation: many browsers convert POST to GET after a 302, while some proxy caches keep the original method. This ambiguity is why 307 and 308 were created. 302 is still widely used for post-login redirects and maintenance pages, but if method preservation matters, prefer 307.
303 See Other — the PRG pattern
303 Always forces a GET — even if the original request was a POST. This is the standard Post/Redirect/Get pattern: the browser POSTs a form, the server returns 303 with a confirmation page URL, and the browser GETs the confirmation. This prevents accidental form re-submission on refresh. Use 303 when redirecting after successful form submission or resource creation.
307 Temporary Redirect & 308 Permanent Redirect — method-preserving
307 and 308 are the unambiguous successors to 302 and 301. 307 is a temporary redirect that preserves the original HTTP method — if you POST to /old, the redirect to /new will also be a POST. 308 is the permanent equivalent: it preserves the method AND tells search engines to transfer link equity (like 301 does). Use 308 for permanent redirects of non-GET endpoints (e.g., POST-only API routes moving to a new path).
Choosing the right redirect code
Permanent URL change (GET): 301. Permanent URL change (non-GET): 308. Temporary redirect (method doesn't matter): 302. Temporary redirect (preserve method): 307. Post-submission (always GET): 303. If in doubt: 307 is safer than 302 because it's unambiguous — all modern clients preserve the method.

Frequently Asked Questions

Does a 301 redirect lose PageRank?

Google's official guidance says 301 transfers all link equity. Third-party studies show 0-5% loss in practice, which is negligible compared to the 100% loss of a broken link. Always redirect rather than leaving dead URLs.

Should I use 301 or 308 for a permanent redirect?

For GET endpoints (HTML pages, images, API GETs): 301. For non-GET endpoints (API POSTs, form submits): 308. Search engines treat both identically for link equity; the only difference is method preservation.

Why does Chrome show '308 Redirect' for some requests?

Chrome's dev tools Surface the real status code. If you see 308, the server is guaranteeing that the original HTTP method was preserved — likely a POST/PUT/DELETE following the redirect. It's the correct behaviour; 302 would have silently converted POST to GET which can cause 405 Method Not Allowed on the destination.

Try these related tools