Shopify 301 Redirects: When to Use a 301 vs a 302
How Shopify 301 redirects work, why Shopify’s redirect tool only makes 301s, and the rare cases where a temporary 302 is the right call.
A Shopify 301 redirect is a permanent redirect, and it’s the only kind Shopify’s built-in tool creates. (For the step-by-step on creating, importing and troubleshooting redirects, see the Shopify URL redirects guide.) When a URL breaks or moves, the web offers two redirect options: 301 and 302. Pick the wrong one and you either lose the link authority you’ve built on that URL, or you prevent Google from updating its index. Both outcomes are bad.
Most guides will tell you to always use 301 and move on. That’s mostly correct, but the reasoning matters — because understanding why will tell you the few cases where 302 is right, and also reveal a larger truth: the best solution to a broken link usually isn’t a redirect at all.
What 301 and 302 Actually Tell Google
HTTP status codes are instructions from your server to whoever requested a URL. When a browser or Googlebot requests a URL:
301 (Moved Permanently): “This URL has moved to a new location permanently. Update your records — the new URL is the one you should be using from now on.” Google interprets this as: index the new URL, transfer ranking signals from the old one, stop crawling the old URL over time.
302 (Found / Moved Temporarily): “This URL has temporarily moved. Keep the original URL in your records — we’ll be back.” Google interprets this as: keep the original URL in the index and keep crawling it. A 302 left in place for a long time is eventually treated like a 301.
Google has said both kinds pass ranking signals. What differs is which URL it shows in search, and that decides where your rankings build up.
How Link Equity Flows (or Doesn’t)
With a 301, Google passes the original URL’s link equity on to the destination (Google has said since 2016 that redirects don’t lose PageRank). If /products/classic-boots had backlinks from ten shoe review sites, those links’ ranking value moves to /products/womens-classic-leather-boots when you set up a 301.
With a 302, Google keeps the original URL as the one it shows in search, since you’ve said the move is temporary. If you never revert it, the old address can stay in results for weeks or months before Google decides the move was permanent after all, and the new URL takes that long to take over.
Using a 302 when you mean a 301 doesn’t throw rankings away, but it slows the switch to the new URL for no benefit.
When to Use 301
Deleted Products
A product that’s been permanently removed should have a 301 redirect to the most relevant alternative — the closest equivalent product, or the parent collection if nothing comparable exists.
Don’t redirect to your homepage. Redirecting to an unrelated page like your homepage creates a soft 404 — Google recognises the irrelevance and doesn’t transfer authority.
Changed URL Handles
If you update a product’s URL handle (from /products/boots to /products/womens-ankle-boots), Shopify automatically creates a 301 redirect. This covers the product page URL. But internal links in your blog posts, product descriptions, and pages still point to the old URL — those need to be updated directly.
Restructured Collections
When you reorganise your collection taxonomy, set up 301 redirects from old collection URLs to new ones before removing the old URLs.
Domain Migrations
Moving from one domain to another? Every URL on the old domain should have a 301 to the corresponding URL on the new domain. This is the most important use of 301 redirects — done correctly, it preserves most of your domain’s accumulated authority.
Merging Duplicate Pages
If you have two pages covering the same topic and want to consolidate them, 301 the weaker one to the stronger one. This concentrates link equity rather than splitting it.
When to Use 302
The genuine use cases for 302 are narrow:
A/B Testing
If you’re testing two versions of a product page, a 302 from the original to the variant tells Google to keep the original indexed rather than the test variant. When the test ends and you revert, nothing needs to change in terms of SEO.
Seasonal Redirects You Plan to Revert
If you redirect /collections/winter-coats to a seasonal landing page during winter but plan to restore the collection at that URL in spring, a 302 is technically more accurate. In practice, most merchants don’t set up this level of nuance and just use 301 — which is fine for short durations.
Out-of-Stock Products You’ll Restock
If a product is temporarily out of stock and you’re redirecting to a “notify me” page or an alternative, a 302 keeps the original product URL in Google’s index — useful if you expect the product to return.
Login-Required Pages
If unauthenticated users are temporarily redirected to a login page, that’s a 302.
How to Set Up Redirects in Shopify
Via Shopify Admin (301 only)
- Go to Online Store → Navigation → URL Redirects
- Click Add URL redirect
- Enter the old URL in “Redirect from” (e.g.,
/products/old-boots) - Enter the new URL in “Redirect to” (e.g.,
/products/womens-ankle-boots) - Save
Shopify’s built-in tool only creates 301 redirects. There’s no option to choose 302 here.
Via Theme Code
For more control — including 302 redirects or wildcard rules — you’d need to modify your theme’s Liquid files or use a redirect app. This is rarely necessary for standard Shopify use cases.
The Bigger Picture: Redirects Are a Band-Aid
Here’s what most redirect guides don’t say: a redirect should be your last resort for broken links, not your first move.
When a link in your store is broken — a blog post pointing to a deleted product, a product description linking to a removed page — the cleanest fix is to update the link in the content itself. Go to the blog post, find the broken link, change it to the correct URL. Done.
A redirect adds a hop to every request. A small number of redirects is fine. But stores that accumulate redirects over years end up with chains, loops, and hundreds of redirects that slow down crawling and add latency for visitors.
More importantly, if you only add a redirect without updating the source link, the broken link still exists in your content. You’ve hidden the symptom but not fixed the cause.
Relink finds every broken link in your Shopify store — across products, collections, blog posts, and pages — and shows you exactly which content needs updating. Fix the link at the source, and you may not need a redirect at all.
Quick Reference
| Situation | Redirect type |
|---|---|
| Product permanently deleted | 301 → closest relevant product or collection |
| Product URL handle changed | 301 (Shopify does this automatically) |
| Collection restructured or deleted | 301 → most relevant new collection |
| Domain migration | 301 → corresponding new URL |
| A/B test variant | 302 |
| Seasonal redirect you’ll revert | 302 |
| Temporarily out-of-stock product | 302 |
| Redirecting to homepage | Neither — fix the link instead |
Ready to fix your store's broken links?
Relink scans your Shopify store automatically and uses AI to suggest the right fix for every broken link it finds.
Install Relink — FreeFree plan available · No credit card required