All articles
Redirects 1018 min read

301 vs 302 Redirects: What's the Difference and When to Use Each

A plain-English guide to 301 (permanent) vs 302 (temporary) redirects — what each status code means, how they affect SEO and link equity, and which one your short links should use.

By The 302.sh team


Every redirect on the web answers one question for the browser: “the thing you asked for lives somewhere else now — how permanent is that?” The answer is encoded in a single three-digit HTTP status code, and the two you’ll meet most often are 301 and 302. They look almost identical in a browser — the visitor lands on the new page either way — but to search engines, browsers, and caches they mean very different things. Choosing the wrong one can scatter your SEO ranking signals or strand visitors on a page you’ve already moved on from.

This guide explains what each status code actually means, how they affect SEO and link equity, the caching gotcha that trips up most people, and a simple rule for picking the right one every time.

First, what is an HTTP redirect?

When a browser requests a URL, the server can answer with a 3xx status code instead of the page itself. That response carries a Location header pointing at the real destination, and the browser immediately makes a second request to that new address. The whole exchange takes milliseconds and is usually invisible to the visitor.

The 3xx family has several members — 307, 308, 303 and others each have a niche — but 301 and 302 cover the overwhelming majority of real-world redirects. The difference between them is one word: permanent versus temporary.

301: Moved Permanently

A 301 tells everyone — browsers, search engines, caches — that the resource has moved for good and they should stop asking for the old URL. It is the digital equivalent of a permanent change-of-address card filed with the post office.

Search engines respond to a 301 by:

That makes a 301 the correct choice whenever a move is genuinely permanent: you’ve migrated from HTTP to HTTPS, switched domains, consolidated two pages into one, or changed a URL structure. You want the new URL to inherit everything the old one earned.

A 301 is a one-way door. Browsers cache it hard — often forever — so don’t reach for one unless you’re sure you’ll never want the original URL back.

302: Found (Temporary)

A 302 says “the resource you want is over here right now, but keep using the original address — it’ll be back.” The original URL stays the canonical one; the redirect is understood to be a temporary detour.

Because the move is temporary, search engines typically:

302s are the right tool for genuinely temporary situations: A/B testing two versions of a page, sending shoppers to a seasonal landing page, routing visitors to a “back soon” notice during maintenance, or — crucially — powering a URL shortener, where the destination behind a short link may change at any time.

301 vs 302 at a glance

 301 — Permanent302 — Temporary
MeaningMoved for goodMoved for now
Indexed URLDestinationOriginal
Link equityPassed to destinationStays on original
Browser cachingAggressive, often permanentRevalidated each visit
Best forDomain moves, HTTPS, merged pagesA/B tests, short links, maintenance

How each affects SEO and link equity

This is where the choice matters most. A 301 consolidates ranking signals onto the destination — exactly what you want when retiring an old URL for a new one. Pick a 302 for a permanent move and you leave those signals stranded on a URL you’re no longer using, which can stall the new page’s ability to rank.

Google has said for years that it can now pass PageRank through either redirect type, so the old fear that 302s leak all your authority is overstated. But intent still matters: a 302 signals “temporary,” so Google generally keeps the original URL indexed. If your goal is to move authority to a new address permanently, a 301 remains the clearer, safer, and more predictable signal. When in doubt for a permanent change, use a 301.

The caching gotcha nobody warns you about

Here’s the trap that burns people: browsers cache 301 responses aggressively, sometimes indefinitely. Once a visitor’s browser has seen a 301 from old-url to new-url, it may never request old-url again — it jumps straight to new-url from local cache, skipping your server entirely.

That’s fine for a permanent move. But if you set a 301 by mistake and later need to change the destination, returning visitors can be stuck on the old target with no easy way to flush it. A 302, by contrast, is revalidated on each visit, so changing where it points takes effect immediately. This single behavioural difference is why “when unsure, prefer a 302” is reasonable advice for any redirect whose destination might ever change.

Which one should you use?

Use this rule of thumb:

Why URL shorteners use 302

A short link is a temporary pointer by its very nature: the whole value of 302.sh/launch is that you can repoint it from last month’s landing page to this month’s without reprinting the QR code on your packaging. That demands a 302 for two reasons:

There’s also an SEO reason a shortener shouldn’t use a 301: you don’t want the short URL itself competing with your real page in search results, or absorbing its ranking signals. Keeping the redirect temporary leaves the destination as the canonical, indexable address.

How 302.sh handles it

302.sh is named after the status code for a reason: every short link answers with a fast 302 served from Cloudflare’s global edge, close to whoever clicked. On top of that we attach an X-Robots-Tag: noindex, nofollow header to every redirect, so search engines never index the short URL itself — your destination page keeps all of its own authority, and the short link stays a clean, editable, measurable pointer.

Because the redirect is temporary, you can edit any link’s destination whenever you like and the change is live instantly — and every click is counted, with 90-day analytics on every plan, including the free one.

Frequently asked questions

Is a 301 or 302 redirect better for SEO?

Use a 301 when the move is permanent — it passes link equity to the destination and tells search engines to index the new URL. Use a 302 only when the original URL will return, because it keeps the original indexed and does not consolidate ranking signals onto the destination.

Do 302 redirects pass link equity?

Historically 302s passed little or no link equity. Google now says it can pass PageRank through either type, but a 302 still signals “temporary,” so the original URL usually stays indexed. For a permanent move, a 301 remains the safer, clearer signal.

Which redirect do URL shorteners use?

Most URL shorteners use a 302 (temporary) redirect so the destination can be changed later and so click analytics can be recorded on every request. 302.sh uses a 302 and additionally sends an X-Robots-Tag: noindex header on the redirect so the short URL itself never competes with your real page in search results.

Will my browser cache a 301 redirect?

Yes. Browsers cache 301 responses aggressively and often indefinitely, so a visitor who hits a 301 once may skip the original URL entirely on future visits — even after you change it. A 302 is revalidated each time, which is why it is the right choice whenever the destination might change.

Keep reading