You need to send visitors and search engines from one URL to another, and your server offers two obvious options: a 301 or a 302. They look almost identical — both forward the browser to a new address, both happen in a fraction of a second — but choosing the wrong one is one of the most common technical SEO mistakes there is, and it can quietly cost you rankings for months.
This guide settles it: the real difference between a 301 and a 302, what actually happens to your SEO with each, the caching gotcha nobody warns you about, and a simple rule for picking the right one every time.
Quick answer: A 301 is permanent — use it when a URL has moved for good, and it transfers the old page’s ranking signals to the new one. A 302 is temporary — use it when the original URL will come back, and it leaves the original as the canonical address. When in doubt, and the change is meant to last, choose 301.
Table of Contents
The core difference in one line
- 301 Moved Permanently = “this URL has moved for good.” Update everything; the old URL is retired.
- 302 Found = “this URL is away for a bit.” Keep the original; it will return.
Everything else — the SEO behavior, the caching, the right use cases — flows directly from that single distinction between permanent and temporary.
301 vs 302 at a glance
| 301 Moved Permanently | 302 Found | |
|---|---|---|
| Meaning | Permanent move | Temporary move |
| Canonical URL | The new URL | The original stays canonical |
| SEO / link equity | ✓ Transfers to new URL | Stays with the original |
| Browser caching | Cached — hard to undo | Not cached — easy to undo |
| Best for | Domain change, HTTPS, URL restructure | A/B tests, maintenance, promos |
| Method preserved? | ✗ may switch POST→GET | ✗ may switch POST→GET |
| Strict sibling | 308 (permanent, keeps method) | 307 (temporary, keeps method) |
For the full mechanics of each, see our dedicated guides to the HTTP 301 and the HTTP 302.
How each one works
“This URL has moved for good.” The browser caches it, search engines update their index, and the new URL inherits the ranking. Hard to undo.
“This URL is away for a bit.” The browser re-checks the original, which stays canonical and keeps its ranking. Easy to add and remove.
Both redirects do the same mechanical thing: when the browser requests the old URL, the server replies with the status code and a Location header pointing to the new one, and the browser follows it automatically. The difference is the message that status code sends to browsers and search engines.
A 301 says “permanent,” so the browser caches it and remembers it, and search engines update their index to the new URL and treat it as canonical. A 302 says “temporary,” so the browser re-checks the original on the next visit and search engines keep the original URL indexed. Same redirect on the surface; opposite long-term consequences.
The SEO question: does it really matter?
This is where myths pile up, so here’s the accurate picture.
The old belief: a 301 passes “link equity” (PageRank) to the new URL, while a 302 passes none — so using a 302 by mistake throws away your rankings.
What Google actually says today: Google’s John Mueller has clarified that, for Google, it doesn’t matter whether you use a 301 or a 302 for ranking purposes — both pass PageRank, and Google figures out permanence over time. The old “you lose ~15% of equity through a redirect” rule has also been publicly retired; a single, direct 301 passes essentially all of it.
So why still care? Because “Google sorts it out eventually” is not the same as “do whatever you want”:
- Other search engines (Bing and others) still read the codes literally — 302 for temporary, 301 for permanent.
- SEO audit tools (Ahrefs, Semrush, Screaming Frog) flag 302s that look permanent, because relying on a crawler to guess your intent is fragile.
- Speed of transfer. A correct 301 signals permanence immediately, so search engines consolidate to the new URL faster than if they have to infer it from a long-lived 302.
- Mueller’s own advice is to keep a 301 in place for at least a year so the move is fully registered.
When to use a 301 (permanent)
Reach for a 301 whenever the change is meant to last:
- Changing domains —
old-domain.com→new-domain.com. - Switching to HTTPS — all
http://→https://. - Canonicalizing www / non-www — pick one and redirect the other.
- Restructuring URLs —
/blog/?p=123→/blog/my-post. - Consolidating pages — merging duplicates or pruning similar posts into one.
- Retiring a page for good — point it to the closest relevant replacement.
In all of these, the old URL is gone and you want its authority to move with it. Full details in the HTTP 301 guide.
When to use a 302 (temporary)
Choose a 302 only when the original URL will genuinely come back:
- A/B and split testing — route some traffic to a variant without changing the original’s rankings.
- Maintenance or redesign — send visitors to a “back soon” page while you work.
- Seasonal or promotional pages — point a URL at a Black Friday or sale page for the duration of the campaign.
- Live feature testing — try a new flow with users, then make it permanent (switch to 301) if it wins.
The tell: you can name the day the redirect will be removed. If you can’t, it’s probably permanent — use a 301. More in the HTTP 302 guide.
The most common mistake: a 302 that should be a 301
By far the most frequent redirect error in site migrations is using a 302 for a permanent move — usually because a framework or plugin defaults to 302, or because it felt “safer.” The original URL lingers as canonical, search engines take longer to consolidate to the destination, and audit tools light up with warnings. The fix is simple: when the move is permanent, state the 301 explicitly.
The mirror-image mistake is rarer but nastier: using a 301 for something temporary. Because browsers cache 301s aggressively, you can’t simply take it back — returning visitors keep getting redirected from their own cache until it expires. Which leads to the difference nobody warns you about.
The caching gotcha nobody warns you about
Here’s the practical distinction that outweighs the SEO debate for most people: a 301 is cached by the browser; a 302 is not.
- A 301 is sticky. Once a browser sees it, it remembers it and goes straight to the new URL on every future visit — sometimes for a very long time. Great when the move is permanent; a real problem if you made a mistake, because removing the rule on the server doesn’t clear the copy already cached in each visitor’s browser.
- A 302 is disposable. Because it’s temporary, the browser re-checks the original URL next time, so you can add and remove a 302 freely.
This is the strongest practical argument for the golden rule: when you’re not certain a move is permanent, use a 302 — it’s reversible. Save the 301 for when you’re sure.
What about 307 and 308?
These are the strict, method-preserving versions for cases where a POST must stay a POST (APIs, forms): 307 is the temporary one (like a 302 that won’t downgrade the method) and 308 is the permanent one (like a 301 that won’t). For 95% of everyday redirects — changing URLs, moving domains, running a promo — you’ll only ever need 301 and 302.
How to set up and check either one
Both are server-side one-liners. A quick reference:
apache
# Apache .htaccess
Redirect 301 /old-page /new-page # permanent
Redirect 302 /old-page /temp-page # temporaryCode language: PHP (php)nginx
# Nginx
return 301 /new-page; # permanent
return 302 /temp-page; # temporaryCode language: PHP (php)To confirm which code a URL actually returns, run curl -I https://example.com/old-page and read the status line, or open your browser’s DevTools Network tab. For a full walkthrough of every method (PHP, WordPress, www and HTTPS rules), see our guide to URL redirection.
Quick answers about 301 vs 302 redirects.
?What’s the main difference between a 301 and a 302?
?Is a 301 or 302 better for SEO?
?Does a 302 redirect hurt SEO?
?If I’m not sure which to use, which should I pick?
?Can I change a 302 to a 301 later?
?Why is a 301 so hard to undo?
301 or 302, www or HTTPS — Copahost gives you easy .htaccess access, free SSL, and support that helps you set up clean redirects without losing rankings.
Explore Copahost hostingConclusion
The 301-vs-302 decision comes down to one question: is this move permanent or temporary? Permanent moves — new domains, HTTPS, restructured URLs — take a 301, which carries your SEO authority to the new address. Temporary detours — tests, maintenance, promos — take a 302, which keeps the original URL canonical and stays easy to undo. The old fear that a 302 “kills” SEO is outdated, but using the correct code still matters for clarity, other search engines, and clean audits. And remember the caching rule that trips people up: a 301 is sticky and hard to reverse, so when you’re not sure, the reversible 302 is the safer pick.
Setting up redirects and want a host that makes it simple? Explore Copahost’s web hosting — with easy .htaccess access, free SSL, and support to help you get every redirect right.
