What is the difference between a 301 and a 302 redirect?
Permanence. A 301 says the page has moved permanently; a 302 says it has moved temporarily. Search engines treat them very differently, and using the wrong one has real consequences.
301 — permanent.
Signals to consolidate ranking signals onto the new URL. The old page's accumulated authority transfers.
The old URL is dropped from the index and replaced by the new one.
Browsers cache it aggressively, which matters practically — a 301 set by mistake continues redirecting returning visitors even after you remove it, until their cache expires. This makes an accidental 301 unusually painful to undo.
302 — temporary (and 307, its stricter HTTP/1.1 equivalent that preserves the request method).
The original URL is kept in the index, since the move is expected to reverse.
Signals stay with the original.
Not cached by default.
When to use each:
301 — a page permanently moved, a site migration, consolidating duplicate pages, switching to HTTPS, changing domain, or a retired product with a permanent replacement.
302 — A/B testing, a page temporarily unavailable, geographic or device-based redirection where the original URL remains valid, or a promotional page swapped in for a period.
The common mistakes:
Using 302 for a permanent move, so the new URL never accumulates the old one's signals and both linger. Search engines have become better at detecting the intent and may treat a long-lived 302 as permanent, but relying on that is unwise.
Redirect chains — A to B to C. Each hop adds latency and dilutes signals slightly. Update to point directly at the final destination.
Redirecting everything to the homepage during a migration. Users arriving expect the specific content; sending them to the homepage is treated as a soft 404 and loses the value of every one of those URLs.
Redirect loops.
Other codes worth knowing: 308 (permanent, method-preserving), 410 Gone for deliberately removed content, and 404 for not found.