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.
| Feature | 301 Moved Permanently | 302 Found (Temporary) |
|---|---|---|
| Meaning | Resource has permanently moved | Resource is temporarily at a different URL |
| Browser caching | Cached; future requests skip the original URL | Not cached by default |
| Search engine behavior | Old URL replaced in index by new URL | Old URL retained in index |
| Link equity (SEO) | Passes to the destination URL | May not pass, original URL stays indexed |
| HTTP method handling | Browsers may change POST to GET | Browsers may change POST to GET |
| Method-preserving equivalent | 308 Permanent Redirect | 307 Temporary Redirect |
| Typical use cases | Site migrations, URL restructuring, HTTP→HTTPS | Maintenance pages, A/B tests, seasonal redirects |
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.
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.
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.
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.