301 vs 302 Redirect

Both status codes redirect a client to a different URL. The distinction — permanent vs temporary — determines how browsers cache the redirect and how search engines handle the original URL in their index.

Quick Comparison

Feature301 Moved Permanently302 Found (Temporary)
MeaningResource has permanently movedResource is temporarily at a different URL
Browser cachingCached; future requests skip the original URLNot cached by default
Search engine behaviorOld URL replaced in index by new URLOld URL retained in index
Link equity (SEO)Passes to the destination URLMay not pass, original URL stays indexed
HTTP method handlingBrowsers may change POST to GETBrowsers may change POST to GET
Method-preserving equivalent308 Permanent Redirect307 Temporary Redirect
Typical use casesSite migrations, URL restructuring, HTTP→HTTPSMaintenance pages, A/B tests, seasonal redirects

301: Permanent Redirect

A 301 response tells the client that the requested resource has permanently moved to the URL in the Location header and that future requests should go directly to the new URL. Browsers cache 301 redirects aggressively: after following a 301, a browser will go directly to the destination on all subsequent requests without asking the origin server again, even across browser restarts. This caching means a mistaken 301 can be difficult to undo — users who visited before the fix will continue going directly to the old destination from cache.

For search engines, a 301 is the standard signal to update the indexed URL. The old URL is removed from the search index and the new URL takes its place. Ranking signals associated with the old URL are transferred to the destination.

302: Temporary Redirect

A 302 response tells the client that the resource is currently at a different URL but the original URL remains valid and should continue to be used for future requests. Browsers do not cache 302 responses by default, so each visit to the original URL contacts the server to get the current redirect target. This makes 302 easy to change or remove without residual caching issues.

Search engines treat a 302 as a signal to keep the original URL in their index. The destination page is crawled but the original URL retains its indexed position. Using a 302 for a permanent move means the old URL stays indexed and ranking signals are not consolidated at the destination — a common SEO mistake.

When to Use Each

Use 301 when the move is permanent and you want search engines to update their index: domain migrations, URL restructuring, consolidating duplicate content, or enforcing HTTPS from HTTP.

Use 302 when the redirect is genuinely temporary and you intend to restore the original URL: maintenance windows, short-term promotional pages, or A/B testing where traffic will return to the original URL once the test ends.

307 and 308: Method-Preserving Variants

The HTTP specification has always allowed clients to change the HTTP method when following a 301 or 302 — a POST redirected with a 301 may be reissued as a GET to the new URL. If you need to preserve the original method (POST, PUT, DELETE) through the redirect, use 307 (temporary, method-preserving) or 308 (permanent, method-preserving) instead.

Trace a redirect chain with the probe tool →