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. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

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.

The two dimensions that separate the codes

Every redirect code sits somewhere on two independent axes:

Permanence:

  • Permanent (301, 308) — the resource has moved for good. Browsers should update bookmarks, and search engines should transfer ranking signals (link equity) to the new URL.
  • Temporary (302, 303, 307) — the resource is temporarily elsewhere. Browsers do not update bookmarks, and search engines keep indexing the original URL.

Method preservation:

  • Rewrite to GET303 always switches the method to GET. 301 and 302 historically allowed agents to switch POST to GET, and most browsers still do.
  • Preserve method307 and 308 guarantee the original method and body survive the redirect unchanged. A POST to a 307 target is still a POST.

Quick decision guide

ScenarioCodeWhy
Permanent domain move (preserve POST)308Permanent + method-safe
Permanent URL restructure (GET pages)301Permanent; POST→GET rewrite is acceptable
Temporary maintenance page307Temporary; preserves method
Form POST → result GET (Post/Redirect/Get)303Always redirects to GET
Redirect while keeping POST intact temporarily307Temporary + method-safe
Signal cached content is still fresh304Not a navigation redirect

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. 304 Not Modified is the odd one out — it is part of conditional caching requests, not navigation, and returns no body. The server sends it to answer an If-None-Match or If-Modified-Since conditional request when the cached copy is still valid.

Common mistakes

  • Using 302 for permanent moves — search engines treat it as temporary and keep indexing the old URL indefinitely.
  • Redirect chains — A→B→C wastes round trips, dilutes link equity, and slows page loads. Test with curl -IL to see the full chain and collapse it to a single hop.
  • Not including Retry-After on 503 redirects503 with Location is unusual but sometimes used for maintenance; if you use a 302 for maintenance, crawlers stop indexing the original URL.
  • Redirecting POST to a new location without 303 — use 303 See Other after a form submission so a page refresh re-fetches the confirmation page with GET rather than resubmitting the form.

Caching behaviour

  • 301 and 308 are cacheable by default — browsers and caches store them without an explicit Cache-Control. If the redirect might change, send Cache-Control: no-store.
  • 302 and 307 are not cached by default unless explicit freshness headers are included.
  • 304 is used in place of a body; the client assembles the response from its cache.