Updated 10 hours ago
The difference between 301 and 302 redirects seems subtle—both tell browsers to go somewhere else. But that three-digit distinction has enormous consequences. Choose wrong and your site can vanish from search rankings. Not because anything is broken, but because you told search engines the wrong story about your intentions.
The Core Distinction
Both redirects say "go somewhere else." The difference is what they imply about the future:
301 Moved Permanently: This is a name change. The old URL is dead. Update your records.
302 Found: This is a forwarding address. The old URL still matters. Check back later.
That's it. Everything else—caching behavior, SEO impact, browser handling—flows from this single semantic distinction.
How Redirects Work
When you request a URL that redirects, the server responds with a 3xx status code and a Location header:
Your browser automatically requests the new location. You see the final destination, not the redirect.
301: The Permanent Move
A 301 tells the world: "This URL has permanently moved. Stop using it."
What happens:
- Browsers cache this redirect, often indefinitely
- Search engines transfer ranking signals (90-99%) to the new URL
- Search engines replace the old URL with the new one in their index
- Bookmarks should be updated to the new URL
When to use 301:
- Site restructuring (
/products/item-123→/shop/item-123) - Domain migrations (
old-domain.com→new-domain.com) - Consolidating duplicate content to a canonical URL
- Enforcing HTTPS (
http://→https://)
The key question: Will this URL ever come back? If no, use 301.
302: The Temporary Detour
A 302 tells the world: "This URL is temporarily elsewhere. The original is still the real address."
What happens:
- Browsers don't cache this redirect long-term
- Search engines keep the original URL indexed
- Ranking signals stay with the original URL
- Each request checks if the redirect is still in effect
When to use 302:
- Maintenance pages (site is temporarily down)
- A/B testing (temporarily sending some users elsewhere)
- Geographic redirects (user might travel)
- Login redirects (redirect to login, then back to original page)
- Any situation where the original URL should remain the "real" one
The key question: Will this URL return to normal? If yes, use 302.
The SEO Trap
Here's where people get hurt:
You restructure your site. URLs change permanently. But you use 302 because... it's the default in your framework, or you didn't think about it, or you thought "redirect is redirect."
Months later, you notice your search rankings have tanked. Your old pages had years of backlinks and authority. Your new pages have nothing. The ranking signals never transferred because you told Google "this is temporary—keep the old URL indexed."
Google kept your old URLs indexed. They now point to pages that redirect. Your new URLs have no history. You accidentally orphaned your own SEO.
The fix is simple but slow: Change 302s to 301s and wait weeks or months for search engines to reprocess.
The Caching Trap
The reverse mistake is equally painful:
You put up a maintenance page. You use 301 because "it's redirecting, right?" Your maintenance ends. Users keep seeing the maintenance page. Their browsers cached the 301 and won't even check if it's still there.
You can't fix this from your server. The redirect lives in your users' browsers. They have to clear their cache, or you have to wait for it to expire.
The rule: 301 for permanent. 302 for temporary. No exceptions.
307 and 308: The Method-Preserving Variants
There's a historical quirk: browsers sometimes changed POST requests to GET when following 301/302 redirects. This broke form submissions.
HTTP/1.1 introduced stricter versions:
307 Temporary Redirect: Like 302, but guarantees the request method stays the same.
308 Permanent Redirect: Like 301, but guarantees the request method stays the same.
The browser makes a POST (not GET) to /new-endpoint with the original body intact.
When to use 307/308:
- Redirecting API endpoints that receive POST/PUT/DELETE
- Any redirect where preserving the HTTP method matters
For simple GET requests, 301/302 are fine and have broader compatibility.
Redirect Chains and Loops
Chains happen when redirects point to other redirects:
Each hop adds latency and loses some SEO value. Point directly to the final destination.
Loops happen when redirects form a cycle:
Browsers detect this and show "too many redirects." Audit your redirect logic carefully.
Implementation
Nginx:
Apache:
Node.js/Express:
Testing Redirects
You'll see:
Or use browser DevTools → Network tab. Click any redirected request to see the status code and Location header.
The Decision Framework
When adding a redirect, ask one question:
"Will the original URL ever be the right URL again?"
- No → 301 (or 308 for non-GET requests)
- Yes → 302 (or 307 for non-GET requests)
That's the whole decision. Everything else—SEO, caching, browser behavior—follows automatically from getting this right.
Frequently Asked Questions About 301 vs. 302 Redirects
Was this page helpful?