Updated November 2026 · 8 min read
301 vs 302 Redirect — Which Should You Use for Short Links?
If you shorten URLs, share links on social media, or manage any kind of web redirect, you need to understand the difference between 301 and 302 redirects. Picking the wrong one can silently tank your SEO.
What Is a Redirect?
A redirect is an HTTP response that sends a browser (or search engine crawler) from one URL to another. When you visit https://trimlink.co/abc, the server responds with a status code and a Location header pointing to the destination URL. Your browser then automatically follows it.
The status code in that response is what matters. It tells both browsers and search engines how to treat the redirect — is it permanent or temporary? That distinction has real consequences for SEO, caching, and link equity.
- 1Click
trimlink.co/abc
- 2Lookup
find the destination, log the click
- 3Respond
3xx status + Location header
- 4Land
yourbrand.com/page
301 or 308 (permanent)
Ranking signals pass through to the destination. Browsers may cache the hop, so a repeat visit can skip the short link and go uncounted.
302 or 307 (temporary)
Signals stay on the short URL. Browsers don't cache the hop, so every click reaches the shortener and is counted. TrimLink links send a 307.
What Is a 301 Redirect? (Permanent)
A 301 redirect tells browsers and search engines: "This URL has permanently moved to a new location." It is the HTTP status code for Moved Permanently.
SEO Implications
- Points Google at the new URL. Google uses a permanent redirect as a signal that the destination should be the canonical URL, so the destination is the page it indexes and shows in search.
- Search engines update their index. Over time, the old URL gets replaced by the new URL in search results.
- Browsers cache aggressively. Once a browser sees a 301, it may skip the redirect entirely on future visits and go straight to the destination. This makes subsequent visits faster.
When to Use a 301
- You moved a page to a new URL permanently
- You changed your domain name (e.g., old-brand.com to new-brand.com)
- You consolidated multiple pages into one
- You are running a URL shortener where short links permanently map to destination URLs
- You switched from HTTP to HTTPS
Example: A server response for a 301 redirect looks like this:
HTTP/1.1 301 Moved Permanently Location: https://example.com/full-destination-url
What Is a 302 Redirect? (Temporary)
A 302 redirect tells browsers and search engines: "This URL has temporarily moved. The original URL will be back." It is the HTTP status code for Found (previously called Moved Temporarily).
SEO Implications
- No canonical signal. Google's redirect guide says a temporary redirect is not used as a signal that the destination should be canonical. The destination can still be indexed if other signals point to it.
- The original URL stays indexed. Google continues to show the original URL in search results, expecting it to return.
- Browsers do not cache. Each visit goes through the redirect server, which adds latency but gives you flexibility to change the destination.
When to Use a 302
- A/B testing where you temporarily redirect to a variant
- Maintenance pages shown while a site is being updated
- Geolocation-based redirects that change per user
- Promotional pages that will be removed later
- Any redirect you plan to reverse in the near future
Example: A server response for a 302 redirect looks like this:
HTTP/1.1 302 Found Location: https://example.com/temporary-page
301 vs 302 Redirect: Side-by-Side Comparison
| Feature | 301 (Permanent) | 302 (Temporary) |
|---|---|---|
| Type | Permanent | Temporary |
| Canonical signal | Destination should be canonical | Not used as a signal |
| Search index | Destination URL replaces original | Original URL stays indexed |
| Browser caching | Cached (faster repeat visits) | Not cached (always redirects) |
| Can change destination? | Difficult (browsers may cache old destination) | Easy (no caching issues) |
| Best for | Domain migrations, URL shorteners, HTTPS upgrades | A/B tests, maintenance, geo-redirects |
| HTTP version | HTTP/1.0 and HTTP/1.1 | HTTP/1.0 and HTTP/1.1 |
Which Redirect Should URL Shorteners Use?
For SEO, the answer is a permanent redirect: 301 or 308. Google lists both as permanent.
A short link's mapping rarely changes. On TrimLink it never does: trimlink.co/launch always goes to the URL it was created with. Judged on meaning alone, that makes a permanent redirect the natural fit. (New to this? Our guide on what a URL shortener is and how short links work covers the fundamentals.)
A permanent redirect also helps the link creator. When other people share and link to the short URL, it tells Google that the destination is the real page, so the destination is what gets indexed and shown. With a temporary redirect, Google keeps treating the short URL as the page, and nobody is trying to rank a short URL.
The cost is counting. Browsers may cache a permanent redirect, so a repeat visit can go straight to the destination without touching the shortener, and that click is never recorded.
How TrimLink links redirect
Every TrimLink link answers with one server-side temporary (307) redirect, straight to the destination you set. Browsers don't cache it, so every click reaches TrimLink to be counted. There is no ad page or countdown in between. The click is counted before the redirect is sent, and link-preview bots from WhatsApp, Slack, LinkedIn and Facebook get the redirect without being counted as clicks.
Shorteners differ here. Some use temporary redirects to keep the option of changing where a link points, and some, TrimLink included, use them so every click is counted. If SEO matters to you, check what your shortener actually sends. Paste one of your links into our Bitly link expander, which shows every hop with its status code. It works on links from other shorteners too.
Other Redirect Types You Should Know
While 301 and 302 are the most common, there are a few other redirect types worth knowing about:
307 Temporary Redirect
The modern HTTP/1.1 version of a temporary redirect. The key difference from 302 is that a 307 strictly preserves the HTTP method. If the original request was a POST, the redirect will also be a POST. With a 302, browsers may change POST to GET. For simple link clicks (GET requests), 302 and 307 behave identically.
308 Permanent Redirect
The modern HTTP/1.1 version of a permanent redirect. Like 307 is to 302, 308 is to 301 — it preserves the HTTP method strictly. A 308 guarantees that a POST request stays a POST after the redirect. For URL shorteners handling GET requests, 301 and 308 are functionally the same.
Meta Refresh
Not a true HTTP redirect. Instead, it uses an HTML <meta http-equiv="refresh"> tag to redirect after a delay. This is slower, does not pass SEO value reliably, and is generally considered a bad practice. Avoid it for anything important.
What a Short Link Should Answer When It Can't Redirect
The status code question doesn't end at 301 vs 302. A short link also needs a sensible answer when there is nowhere to send the visitor. Here is what TrimLink does, read straight from our redirect code:
- A code that never existed (usually a typo) gets a
404 Not Found. Nothing was ever there, so search engines should forget it. - A link that existed but is gone (deleted, past an expiry date its owner set, paused, or disabled for abuse) gets a page that says which of those happened, in plain words. The page is marked
noindex, so it never turns up in search. Someone scanning an old flyer learns the link is gone instead of staring at a bare error. - A www address is redirected to the same path without the www, so each link has exactly one public form.
Two lessons carry over to any redirect you manage. First, give each case its own answer: 404 for "never existed" and a clear explanation for "existed, now gone". Second, test the response your server really sends, not what you think it sends. Run curl -I on a link and read the first line, or paste it into a link expander. We check our own links the same way.
Dead links hurt most on paper, where you can't fix them. If a link is going on a poster or a menu, read how to make a QR code that never expires and which short links never expire first.
Redirect Best Practices
Whether you are managing redirects for a website migration, running a URL shortener, or setting up marketing campaigns, follow these best practices:
- Use 301 (or 308) for permanent moves. If the URL change is forever (domain migration, URL restructuring, short links), use a permanent redirect so search engines move their signals to the new URL.
- Use 302 only when the redirect is truly temporary. A/B tests, maintenance pages, and seasonal promotions are valid 302 use cases. If you are not sure the move is temporary, default to 301.
- Avoid redirect chains. A redirect chain is when URL A redirects to URL B, which redirects to URL C. Each hop adds latency and can dilute SEO value. Keep it to one redirect whenever possible.
- Avoid redirect loops. If URL A redirects to URL B and URL B redirects back to URL A, the browser will show an error. Always test your redirects after setting them up.
- Monitor your redirects. Use tools like Google Search Console to check for redirect issues. Broken redirects (pointing to 404 pages) waste link equity and frustrate users.
- Do not use meta refresh redirects for SEO. They are slow, unreliable for passing link equity, and provide a poor user experience. Always use server-side redirects (301 or 302).
- Update internal links. After setting up a redirect, update any internal links on your site to point directly to the new URL. This reduces unnecessary redirects and improves page speed.
Once your redirects are sorted, the next step for most marketers is putting their own brand on those short URLs. See our guide on creating custom branded short links with your own domain — or jump straight to TrimLink's free link tools.
Frequently Asked Questions
What is the difference between a 301 and 302 redirect?
A 301 redirect is permanent and tells search engines the original URL has moved forever, passing full SEO value (link equity) to the new URL. A 302 redirect is temporary and tells search engines the original URL will come back, so SEO value stays with the original URL.
Which redirect should a URL shortener use: 301 or 302?
For SEO, a permanent one: 301 or 308. Google treats both as permanent and uses them as a signal that the destination is the page to index and show in search. It treats 302 and 307 as temporary and does not use them as that signal. If the short link never changes destination, a permanent redirect describes it best. The trade-off is counting: browsers may cache a permanent redirect and skip the shortener on repeat visits. TrimLink uses a temporary (307) redirect, so browsers don't cache it and every click reaches TrimLink to be counted.
Does a 301 redirect hurt SEO?
No. Google recommends a permanent server-side redirect, such as a 301, when a page moves for good. Google then treats the destination as the page to show in search results, so the move does not cost you the page.
Can I change a 302 redirect to a 301 later?
Yes, you can change a 302 to a 301 at any time by updating your server configuration. However, it is better to use the correct redirect type from the start. If the move is permanent, use a 301 immediately so search engines begin passing link equity right away.
What is a 307 redirect and how is it different from a 302?
A 307 redirect is the HTTP/1.1 version of a temporary redirect. The key difference is that a 307 strictly preserves the HTTP method (POST stays POST), while a 302 may change POST requests to GET. For most URL shortener use cases involving simple GET requests, 302 and 307 behave the same way.
Part of the complete guide to link management.
Short Links That Go Straight to Your Page
One server-side redirect to the destination you set, with no ad page in between.
Privacy-first analytics, custom domains, and a free plan to get started.
Keep reading
More on links, tracking, and keeping your data yours.