Elido
7 min readEngineering

301 vs 302 Redirects: Which One Should Short Links Use

A 301 is a permanent redirect that passes ranking signals; a 302 is temporary and usually does not. What that means for short links, SEO, and caching.

Marius Voß
DevRel · edge infra
A 301 permanent redirect that passes ranking signal and is cached, next to a 302 temporary redirect that stays editable, in the Elido brand palette

A 301 redirect is permanent and a 302 redirect is temporary - and for a URL shortener, that one-word difference decides whether your links pass ranking signals, how aggressively browsers cache them, and whether you can safely change where they point later. A 301 says "this moved for good, send the SEO value to the new address." A 302 says "this is a detour, keep the original on file." Both deliver the visitor to the same place; they just tell machines two opposite stories.

For short links the choice is not obvious, and the popular advice - "always use 301 for SEO" - is wrong often enough to be dangerous. A 301 is cached hard by browsers, which is great for speed and terrible the day you need to repoint an editable link. So the real answer depends on whether the link is permanent or editable, and that is what this post is actually about.

I work on the redirect path, so I will keep this grounded in what happens on the wire rather than in SEO folklore. If you want the wider picture first, whether URL shorteners hurt SEO covers the reputation side, and hitting p95 under 15ms for redirects covers the speed side. Here we are zoomed in on the status code.

What a 301 Redirect Is#

A 301 is the "Moved Permanently" status code. When a server answers a request with 301 and a Location header, it is making a strong claim: this resource now lives at the new URL, permanently, and you should treat the new one as canonical from here on.

Two consequences follow from that claim. Search engines pass ranking signals - the authority and backlinks the old URL accrued - to the destination, which is why a 301 is the standard move for site migrations and HTTPS switches. And browsers cache the redirect, sometimes for a very long time, because "permanent" is taken at face value. The next time that visitor hits the link, their browser may not even ask your server; it jumps straight to the cached destination. The mechanics are spelled out in the MDN guide to HTTP redirections and the original definition lives in RFC 7231 section 6.4.2.

That caching is a feature for a permanent link and a trap for an editable one. Hold that thought - it is the crux of the short-link decision.

What a 302 Redirect Is#

A 302 is "Found," the temporary redirect. It sends the visitor onward exactly like a 301 does, but the message to machines is the opposite: this is a short-term arrangement, the original URL is coming back, so keep it indexed and do not cache the redirect as if it were permanent.

There is a more precise sibling worth a sentence. A 307 is the strict temporary redirect: same intent as a 302, but it guarantees the HTTP method is preserved, so a POST stays a POST. For short links, which are plain GET requests, a 302 and a 307 are indistinguishable in practice. The distinction earns its keep on APIs and form posts, not on a marketing link. If you want the formal version, RFC 7538 defines the permanent variant 308, and the temporary 307 sits alongside it.

The headline property of a 302 is that it is not sticky. Browsers re-check it, which means the day you change the destination, returning visitors follow the new target immediately. No cached detour to the old place.

Here is the part everyone actually searches for. The classic rule is that a 301 passes ranking signals and a 302 does not. That was strictly true for years, and it is still the safe assumption to plan around. Google has since said that 301s pass ranking signals and that persistent 302s eventually do too - but "eventually" is doing heavy lifting, and you do not control the timeline.

So the practical SEO summary fits in one table.

Property301 (permanent)302 (temporary)307 (temporary, strict)
Passes ranking signalYes, fully and quicklySlowly, only if it persistsSlowly, only if it persists
Search engine keeps old URL indexedNo, swaps to targetYes, expects it to returnYes, expects it to return
Browser cachingAggressive, can be stickyNot cached as permanentNot cached as permanent
HTTP method preservedNot guaranteedNot guaranteedGuaranteed
Right forA move that is finalA move that will be undoneTemporary moves on POST/API

The takeaway is not "301 good, 302 bad." It is "match the code to the truth." If the move is permanent, a 301 transfers signal cleanly and fast. If it is temporary, a 302 protects the original URL's place in the index. Using a 301 for something you will reverse, or a 302 for something permanent, is how redirects quietly cost you ranking.

Now apply all of that to a short link, where the rules collide.

The single best feature of a managed short link is that you can change its destination after you have shared it. A printed flyer, a QR code on a package, a link in a scheduled post - you cannot recall those, but you can repoint the link they carry. That editability is worth more than a marginal SEO gain for most marketing links, and link rot prevention leans entirely on it.

A hard-cached 301 breaks that promise. If a visitor's browser cached the 301 to the old destination, repointing the link does nothing for them - they keep landing on the stale target until the cache expires, which you cannot force. This is the exact failure a 302 avoids. Because the browser never treats a 302 as permanent, your edit takes effect for everyone on their next click. That is why a lot of shorteners, ours included, default editable links to a temporary redirect: the link stays under your control. The redirect tier resolves the current target on every request, so an edit is live the moment you save it - the caching strategy behind that is in our cache layer for redirects.

If you want links that stay editable and still resolve in single-digit milliseconds, spin up a free Elido workspace and create your first short link.

Strip away the theory and it comes down to one question: will this link's destination ever change?

  • It will never change - a permanent vanity link to your homepage, a forever-link in a book. Use a 301. You get the full, fast ranking-signal transfer and the speed bonus of browser caching, and you give up nothing because you were never going to repoint it.
  • It might change - any campaign link, any editable short link, anything you would want to fix without reprinting. Use a 302. You trade a slice of immediate SEO transfer for the guarantee that an edit reaches every visitor instantly.

For the overwhelming majority of short links - campaign URLs, smart links that route by country or device, anything on a custom domain you are actively managing - editability wins, so 302 is the sane default. Reserve the 301 for the genuinely permanent. And if you are just getting started, how to shorten a URL covers the creation flow that sits in front of all of this.

Never take a shortener's word for it. Ask the link directly with a HEAD request:

curl -sI "https://go.yourbrand.com/spring"

The first line of the response is the status code - HTTP/2 301, HTTP/2 302, or HTTP/2 307 - and the Location header shows where it points. If you see a chain of redirects, each hop is a separate response, and every extra hop adds latency and a chance to leak or lose signal. A clean short link is one hop: the short URL to the final destination, nothing in between. Watching for redirect chains is part of how short links resolve under the hood, and keeping that chain to a single hop is half the reason our redirect latency stays low.

The mental model is the whole post: a 301 is a promise you cannot take back, a 302 is a promise you can. Pick the one that matches whether the link is allowed to change, check it with curl, and your redirects will do what you meant rather than what you assumed.

Try Elido

Paste a URL, get a working short link

No signup. Link lives for 30 days. Sign up to keep it forever.

Free, no signup required · 2 per day

Try Elido

EU-hosted URL shortener with custom domains, deep analytics, and an open API. Free tier - no credit card.

Tags
301 vs 302 redirect
301 redirect
302 redirect
redirect status code
short link redirect
redirect seo

Continue reading