HTTP 3xx Redirect Codes

Every HTTP 3xx redirect with caching behavior, SEO impact and browser handling.

Detailed reference for HTTP 300–399 redirect status codes covering permanent vs temporary semantics, method preservation, caching behavior and SEO impact of 301, 302, 307 and 308.

What is the difference between 301 and 308?

Both are permanent redirects, but 301 historically allowed clients to change POST to GET, while 308 guarantees the method and body are preserved. Use 308 when redirecting non-idempotent endpoints permanently.

HTTP 3xx redirect status codes

The 3xx class tells the client that further action — usually following a Location URL — is needed to complete the request. The nuances matter: some redirects are permanent and pass SEO signals, others are temporary; some preserve the original HTTP method and body, others quietly rewrite it to GET. Pick the wrong one and you can break a POST, lose search rankings, or create redirect loops. Search the reference above by code or keyword to compare permanence, method handling, and caching.

How it works

A redirect response carries a Location header pointing to the new target. The browser then issues a fresh request to that URL. Two independent dimensions distinguish the codes. First, permanence: 301/308 are permanent (update bookmarks, transfer ranking), while 302/303/307 are temporary. Second, method preservation: 307 and 308 guarantee the method and body survive the redirect, 303 always switches to GET, and 301/302 historically allowed POSTGET rewrites that differ across clients. 304 Not Modified is the odd one out — it is part of conditional requests and caching, not navigation, and returns no body.

Tips and examples

  • For an HTTP→HTTPS upgrade or a permanent domain move, prefer 308 so POST requests are not silently downgraded, and so engines pass ranking to the canonical URL.
  • After a form POST, respond with 303 See Other to the confirmation page; refreshing then re-fetches that page with GET instead of resubmitting.
  • Support conditional requests: emit ETag/Last-Modified and answer matching If-None-Match/If-Modified-Since with 304 to cut bandwidth.
  • Avoid chains: redirecting A→B→C wastes round trips and dilutes link equity. Point every old URL directly at the final destination.