301 vs 302 Redirects: Which One Should You Use?
Rick Sarkar
author
301 vs 302 redirects explained simply. Learn the real difference, how each affects SEO and browser caching, and which one your short links should use.
You move a page. You set up a redirect. Traffic keeps flowing, and everything looks fine.
Six weeks later, your rankings have quietly slipped, the old URL is still sitting in Google's index, and half your visitors are landing somewhere you stopped using a month ago.
Almost always, the cause is one digit: you used a 302 where you needed a 301, or the other way around.
This guide explains what each redirect actually does, clears up the biggest myth in the 301 vs 302 debate, and shows you exactly which one to use - for site migrations, campaigns, A/B tests, and short links.
What is an HTTP Redirect?
A redirect is a message from a server telling a browser, "the thing you asked for lives somewhere else - go here instead."
When a browser requests a URL, the server replies with a status code. Most of the time that code is 200 OK, meaning the page was found. But when a redirect is in place, the server responds with a 3xx code and a Location header naming the new destination:
HTTP/1.1 301 Moved Permanently
Location: https://skybrance.com/new-pageThe browser reads that header and immediately requests the new address. The visitor sees nothing but the destination page. The entire exchange takes milliseconds - the same mechanism that makes URL shorteners work.
There are several redirect codes in the 3xx family, but two account for the overwhelming majority of real-world use: 301 and 302.
What is a 301 Redirect?
A 301 Moved Permanently tells browsers and search engines that a page has moved for good, and that the new URL should replace the old one permanently.
It carries three signals:
- To search engines: stop indexing the old URL, index the destination instead
- To browsers: remember this, and skip the old URL next time
- To you: this decision is final
A 301 is the correct choice when the original URL is never coming back. Typical cases include migrating from HTTP to HTTPS, changing domains, consolidating duplicate pages, or replacing an outdated article with a rewritten one.
You can read the formal definition in the MDN documentation for HTTP 301.
What is a 302 Redirect?
A 302 Found tells browsers and search engines that a page is temporarily somewhere else, but the original URL is still the real one and will return.
Its signals are the opposite of a 301:
- To search engines: keep the original URL indexed, this move is temporary
- To browsers: don't cache this, check again next time
- To you: this is reversible
A 302 fits situations where the redirect is genuinely short-lived - a seasonal landing page, a maintenance window, a page under A/B testing, or a campaign link whose destination changes between campaigns.
The MDN reference for HTTP 302 covers the specification in detail.
The Real Difference (It's Not Link Equity)
This is where most writing on the subject goes wrong. The folklore, repeated in more or less every SEO article since about 2012, says that a 301 passes roughly 90โ99% of "link equity" while a 302 passes none, and that you should therefore always reach for a 301 to protect your rankings. That has not been true for a decade, and repeating it has probably caused more bad redirect decisions than any other piece of SEO advice still in circulation.
In 2016, Google's Gary Illyes stated plainly that 30x redirects no longer lose PageRank. Google's John Mueller later explained the mechanism: Google uses redirects to select a canonical URL, and ranking signals are forwarded through that canonicalization - for 301s and 302s alike. Google's own documentation on redirects and canonicalization reflects the same position.
Which leaves the obvious question: if both pass signals, what does the choice actually decide? The redirect type controls which URL stays in Google's index, not whether authority flows. That turns out to matter a great deal more than the thing everyone was arguing about.
Concretely:
- Use a 301, and Google consolidates everything onto the destination URL. The old URL drops out of search results.
- Use a 302, and Google keeps the original URL in the index. Your destination page may never rank on its own.
Picture a business that migrates from an old domain to a new one and uses 302s because someone wanted the option to reverse it. Traffic works fine, so nobody notices a problem. But months later the new domain still isn't ranking, because Google was told all along that the old domain was the canonical one. No link equity was lost. The wrong URL was simply indexed.
Google will sometimes reinterpret a long-running 302 as permanent, but that is a heuristic, not a guarantee - and it can take weeks or months to kick in. Be explicit instead of hoping.
The Browser Caching Trap
The second difference is the one that catches people out in production, and it has nothing to do with SEO.
Browsers cache 301 redirects aggressively, sometimes indefinitely. Once a browser has seen a 301 it may stop contacting your server for that URL at all, going straight to the cached destination on every future visit. For a genuine permanent move that is exactly the behaviour you want - it saves a round trip forever. Everywhere else it is a serious problem, and the reason it is serious is that you cannot undo it from your end.
Suppose you print 5,000 flyers with skyh.in/offer on them, pointing at your Diwali campaign page. The campaign ends, and you update the destination to your new year sale.
If that link was served as a 301, every person who already clicked it keeps landing on the expired Diwali page - possibly for months. Their browser never asks your server again, so it never learns about the change. Clearing that cache is not something you can do remotely, and asking customers to do it is not a plan.
There is a second casualty: your analytics. A cached 301 skips your server, which means repeat clicks are never logged. Your dashboard under-reports real traffic, and you have no way of knowing by how much.
A 302 avoids both problems. The browser checks in every time, so the destination stays editable and every single click gets counted.
Which Redirect Should URL Shorteners Use?
For most marketing and campaign links, 302 is the better default - for three practical reasons:
- Editable destinations. You can repoint a printed QR code or a live social post without reprinting or reposting anything.
- Accurate analytics. Every click reaches your server, so geography, device, and referrer data stay complete.
- Reversibility. Campaign links are temporary by nature, which is precisely the situation a 302 was designed for.
A 301 still makes sense for short links in narrower cases - a permanent vanity URL like skyh.in/careers that will always point to the same place, or a short link being used as a permanent replacement for a retired page.
The rule of thumb: if you might ever change where the link points, use a 302. The SEO cost is zero, and the flexibility is worth a great deal. This is also why the ability to edit a destination after a link is live is one of the most useful features a modern link platform offers.
When to Use Each
Use a 301 when:
- Migrating from HTTP to HTTPS
- Moving to a new domain
- Permanently deleting or replacing a page
- Consolidating duplicate content onto one canonical URL
- Standardising www vs non-www, or trailing slashes
- Retiring an old blog post in favour of a rewritten version
Use a 302 when:
- Running an A/B test between two landing pages
- Pointing a campaign link at a seasonal or promotional page
- Taking a page down temporarily for maintenance
- Routing visitors by country, language, or device
- Serving short links whose destination may change
- Testing a new page before committing to it
What About 307 and 308?
Two newer codes appear regularly in server logs and confuse people, so they are worth knowing.
The problem they solve: 301 and 302 predate modern web forms, and browsers historically converted a POST request into a GET when following them. That silently breaks form submissions, payments, and API calls.
- 307 Temporary Redirect - a 302 that preserves the original HTTP method
- 308 Permanent Redirect - a 301 that preserves the original HTTP method
For ordinary page links and short links, 301 and 302 are perfectly fine and remain the standard. For APIs and anything handling form data, 307 and 308 are the safer choices. If you're building integrations, this matters - see our guide on using a URL shortener API for related considerations.
You may also encounter 307 Internal Redirect in Chrome's developer tools on HTTPS sites. That one isn't coming from your server at all - it's the browser enforcing HSTS locally, and it's a good sign.
How to Check Which Redirect a Link Uses
Never assume. Many platforms and plugins default to 302 without telling you, and a misconfigured migration can go unnoticed for months.
Using the command line:
curl -I https://skyh.in/demoThe first line of the response shows the status code. To follow a full redirect chain, use:
curl -IL https://skyh.in/demoUsing your browser:
Open Developer Tools, switch to the Network tab, tick "Preserve log", and load the URL. Each hop appears as a separate entry with its status code.
Testing tip: browsers cache 301s, so a redirect you already visited may not re-request the server. Test in a private window, or use curl, which never caches.
Where This Goes Wrong
- Using a 302 for a permanent move. The most expensive mistake on this list. Google keeps indexing the old URL and your new one struggles to rank.
- Building redirect chains. A โ B โ C โ D adds a network round trip at every hop, slowing page load and hurting Core Web Vitals. Always redirect straight to the final destination in one hop.
- Redirecting everything to the homepage. When you delete pages, sending them all to / looks tidy but Google treats an irrelevant redirect as a soft 404 and passes nothing. Redirect to a genuine equivalent, or return a 410 Gone and let the URL leave the index cleanly.
- Removing redirects too early. Backlinks and bookmarks keep resolving through old URLs for years. Keep permanent redirects in place for at least a year - longer if the old URL earned links.
- Leaving redirects in your internal links. If your own navigation points at a URL that redirects, fix the link. Don't make crawlers take an unnecessary hop.
- Creating redirect loops. A โ B โ A produces an error page for every visitor. Usually caused by two conflicting rules in different layers - a CDN and a server config, for example.
301 vs 302 at a Glance
| Factor | 301 (Permanent) | 302 (Temporary) |
|---|---|---|
| Meaning | Moved permanently | Temporarily elsewhere |
| Indexed URL | Destination | Original |
| Passes ranking signals | Yes | Yes |
| Browser caching | Aggressive, often indefinite | Not cached by default |
| Destination editable later | Difficult | Yes |
| Every click reaches your server | No | Yes |
| Analytics accuracy | Under-reports repeat clicks | Complete |
| Reversible | In practice, no | Yes |
| Method-preserving version | 308 | 307 |
| Best for | Migrations, permanent moves | Campaigns, tests, short links |
What a Short Link Service Does With This
A link shortener sits entirely inside this problem, because its whole job is the redirect. SkyShare issues a 302 for exactly the reason described above: the destination behind a short link is expected to change, and a cached 301 would take that ability away from you. The click is recorded on the way through - country, city, device, browser, OS and referrer, with crawler traffic separated out - and then the visitor is sent on.
The consequence that matters day to day: a QR code printed in March can point somewhere new in September, and the click history stays attached to the same link rather than restarting.
So Which One Should You Use?
Ignore link equity. Both codes pass ranking signals and have done since 2016, which means a lot of what has been written about this decision is arguing about something that stopped being true a decade ago. Two questions are left, and they are both easy to answer:
Which URL should Google keep?
The destination - use a 301. The original - use a 302. That is the entire SEO half of the decision.
Might this link need to move?
If there is any chance, use a 302. Undoing a cached 301 means reaching into caches on machines you do not own.
That resolves to: permanent site changes get a 301 and you commit to it, while campaigns, tests, and anything shortened get a 302 and stay yours to change. The failure mode is nearly always the same one - reaching for 301 because it sounds more authoritative, on a URL that turns out to need moving six weeks later.
If the links you are weighing this up for are campaign links, the decision is already made for you by whatever tool creates them. SkyShare makes the redirect a 302 and the destination editable, which is the combination you want behind anything that ends up on a poster.
Frequently Asked Questions
What is the difference between a 301 and 302 redirect?
A 301 signals a permanent move and tells search engines to index the destination URL instead of the original. A 302 signals a temporary move and tells search engines to keep the original URL indexed. Both pass ranking signals to the destination - the real difference is which URL stays in Google's index, and whether browsers cache the redirect.
Do 302 redirects hurt SEO?
Not in terms of lost authority. Google confirmed in 2016 that all 3xx redirects pass PageRank, and John Mueller has explained that signals are forwarded through canonical selection for both 301s and 302s. The risk with a 302 is different: if you use one for a permanent move, Google keeps indexing the old URL and your new page may never rank properly.
Can you change a 301 redirect after setting it up?
You can change it on your server, but browsers that already cached the original 301 may keep using the old destination for a long time - potentially indefinitely - because they stop contacting your server for that URL. You cannot clear a visitor's cache remotely. If there is any chance you'll need to change the destination, use a 302 from the start.
Should short links use 301 or 302 redirects?
For most marketing and campaign links, 302 is the better choice. It keeps the destination editable, ensures every click reaches your server so analytics stay accurate, and matches the temporary nature of campaign links. A 301 suits permanent vanity URLs that will never point anywhere else.
What is the difference between 302 and 307 redirects?
Both are temporary redirects. The difference is that a 307 preserves the original HTTP method, while a 302 historically allowed browsers to convert a POST request into a GET. For normal page links either works, but 307 is safer for form submissions and API calls where the request method must be preserved.
How long should a 301 redirect stay in place?
At least a year, and longer if the old URL had backlinks. Search engines need to recrawl the old URL before consolidating signals, and external links, bookmarks, and old emails keep resolving through it for years. Removing a redirect too early turns every one of those references into a 404.
