Redirects are everywhere: you move a page, rebrand a URL, force HTTPS. Two codes do the job — 301 and 302 — and they look identical to a human. But to search engines they mean opposite things, and picking wrong can cost you rankings. Here's how to choose correctly.
What each one means
Both are 3xx redirection codes that send the browser to a new URL. The difference is permanence:
- 301 Moved Permanently → "This page has a new home, forever. Update your records."
- 302 Found (temporary) → "It's somewhere else for now, but keep using the original URL."
Why the difference matters (SEO)
This is the whole point. Search engines treat them very differently:
| 301 Permanent | 302 Temporary | |
|---|---|---|
| Message to Google | "Use the new URL from now on" | "Keep the old URL indexed" |
| Ranking signal ("link juice") | Transfers to the new URL | Largely stays with the old URL |
| Index | New URL replaces old | Old URL kept |
| Browser caching | Often cached aggressively | Not cached the same way |
The costly mistake: using a 302 when you've permanently moved a page. Search engines keep the old URL indexed and don't pass ranking signals to the new one — so your shiny new URL never inherits the authority the old one earned. For permanent moves, use 301.
When to use which
| Use 301 (permanent) for… | Use 302 (temporary) for… |
|---|---|
| Moving a page to a new URL for good | A/B testing two versions |
| Rebranding / changing domains | A temporary promo or maintenance page |
| Forcing HTTPS (http → https) | Geo/locale redirects that may change |
| Merging duplicate pages | Anything genuinely short-lived |
Rule of thumb: if you'd be happy for the new URL to replace the old one in Google, use 301. If you want to keep the old URL as the "real" one, use 302.
Common redirect pitfalls
- Redirect chains.
A → B → Cwastes time and dilutes signals. Redirect straight to the final destination. - Redirect loops.
A → B → Abreaks entirely — that's ERR_TOO_MANY_REDIRECTS. - Redirecting everything to the homepage. Moving a page? Redirect to the relevant replacement, not a generic home page — users (and Google) hate it.
Don't forget to monitor them
Redirects are "set and forget" — until one silently breaks (a chain forms, a target 404s, HTTPS redirect misconfigures). Because they sit at the entrance to your site, a broken redirect can quietly block traffic. Checking that key URLs redirect where they should — and land on a 200 — keeps surprises away.
The bottom line
| In one line | |
|---|---|
| 301 | Permanent move — transfers SEO to the new URL. |
| 302 | Temporary — keeps the original URL indexed. |
| Rule | Permanent? 301. Short-lived? 302. |
| Avoid | Chains, loops, and redirecting all to the homepage. |
A redirect is a one-line change with outsized SEO consequences. Reach for 301 for permanent moves (the common case), 302 only when it's genuinely temporary — and keep an eye on them so a broken redirect doesn't quietly cost you traffic.
More: HTTP status codes explained and ERR_TOO_MANY_REDIRECTS.