301 vs 302: Permanent vs Temporary Redirect
Both send the visitor to another URL. 301 says the move is permanent (update your links and index), 302 says it is temporary (keep using the old URL).
301
HTTP 301 Moved Permanently
The resource has a new permanent URL; clients and search engines should use the address in the Location header from now on.
Causes & fixes →
302
HTTP 302 Found (Temporary Redirect)
The resource is temporarily at another URL; clients should keep using the original URL for future requests.
Causes & fixes →| 301 | 302 | |
|---|---|---|
| Meaning | Moved for good | Moved for now |
| SEO | Ranking signals pass to the new URL | Original URL usually stays indexed |
| Browser caching | Cached aggressively | Not cached by default |
| Method on redirect | POST may become GET (use 308 to keep it) | POST may become GET (use 307 to keep it) |
| Use for | HTTPS/www moves, renamed pages, domain changes | Login redirects, maintenance, A/B tests |
Rule of thumb
If you never plan to use the old URL again, use 301 (or 308). Otherwise use 302 (or 307).