301 vs 302 vs 307 vs 308 Redirects for Ecommerce: When Each One Is Correct
The redirect type you choose during a product move, sale, or migration changes whether you keep your rankings. Here's the difference between 301, 302, 307, and 308 — with the ecommerce scenarios where each one is correct.
HTTP redirects are one of the easiest things to get wrong on an ecommerce store, and one of the most expensive when you do. A single batch of 302 redirects during a category-rename or product-URL migration can quietly drop your rankings for weeks while Google waits to see if the move is permanent. Conversely, a 301 on a temporarily out-of-stock product can lose you the URL forever once the product comes back.
There are four redirect status codes most ecommerce stores will encounter — 301, 302, 307, and 308 — and they aren't interchangeable. This guide explains exactly what each one means, when each is correct, and the four mistakes that cost stores ranking equity during migrations.
The Four Redirect Codes in One Sentence Each
- 301 Moved Permanently: the resource has permanently moved to a new URL — search engines should transfer ranking signals and update their index.
- 302 Found: the resource is temporarily located at a different URL — search engines should keep indexing the original URL.
- 307 Temporary Redirect: same intent as 302 (temporary), but the HTTP method must be preserved (a POST stays a POST, not silently rewritten to GET).
- 308 Permanent Redirect: same intent as 301 (permanent), but the HTTP method must be preserved.
The 301/302 split is about permanence; the 307/308 split was added to fix a method-preservation ambiguity in the original spec. For ecommerce, the permanence distinction is almost always the one that matters for SEO.
How Google Treats Each Redirect Type
Google's documentation has been refined over the past several years. The current behavior:
- 301 and 308: treated identically — full link equity transfer, canonical signal moves to the destination URL, original URL eventually drops from the index.
- 302 and 307: treated identically — link equity transfers but the original URL stays the canonical until Google determines the redirect is actually permanent (which can take weeks or months).
The myth that 302s pass no link equity is outdated — they do, eventually. But the relevant question for ecommerce isn't whether equity transfers; it's whether the URL you want Google to index is the source or the destination. A 302 says "keep indexing the original"; a 301 says "the new URL is now canonical."
The Permanent Move Scenario: Use 301
Use a 301 (or 308) whenever the destination URL is meant to be the new permanent home of the content. Common ecommerce examples:
- Product URL slug changes — you renamed
/products/blue-shirtto/products/cobalt-classic-shirtfor SEO reasons - Category restructure — you moved products from
/collections/saleto/collections/clearance - Domain migration — you moved from
old-store.comtonew-store.com - HTTP to HTTPS migration — every HTTP URL redirects to its HTTPS equivalent
- Trailing-slash normalization — pick one (slash or no-slash) and 301 the other
- www to non-www (or vice versa) — pick one canonical hostname and 301 the other
- Product discontinuation with a clear replacement — the v1 product is permanently gone and the v2 product replaces it
If the URL change is one-way and there's no scenario where the original URL would be valid again, a 301 is correct.
The Temporary Move Scenario: Use 302
Use a 302 when the redirect is genuinely temporary — the original URL is meant to come back. Ecommerce examples where this matters:
- Temporary promotion landing pages —
/black-fridayredirects to/black-friday-2026during November, then back to a generic landing page in December - A/B test variants — when split-testing two URL versions, use 302 (or stay on canonical with JS testing)
- Geo-routing —
/products/whiskyredirects EU visitors to/eu/products/whiskyfor compliance, but the URL itself isn't permanently moving - Maintenance pages — temporarily route all traffic to
/maintenanceduring a planned outage - Out-of-stock products with a planned restock — though this is rarely the right choice (see below)
The out-of-stock product nuance
The most common ecommerce question on redirects is "what do I do with an out-of-stock product page?" The short answer: keep the URL live and return a 200, not a redirect. Mark it as out-of-stock in your Product schema (availability: "https://schema.org/OutOfStock"), show the user a "notify when back in stock" form or recommend alternatives, and preserve the URL and the rankings.
If the product is discontinued, 301 to the closest available alternative (the same model in a different color, the newer version, or the category page). Only use a 302 if you genuinely expect the product back on a known short timeline — most stores guess wrong on this and lose the URL during the indecision.
307 and 308: When the Method Matters
307 and 308 exist because of an old spec ambiguity: when a browser receives a 301 or 302 on a POST request, some browsers historically converted the request to GET when following the redirect. This breaks API requests, form submissions, and webhook callbacks. 307 (temporary) and 308 (permanent) require the method to be preserved.
For ecommerce sites, this matters in two places:
- Form submissions: if your checkout, contact, or newsletter form POSTs to a URL that needs to redirect to a final destination, use 308 (or 307 if temporary) so the POST body is preserved
- API endpoints: if you publish an API that may need to redirect, use 308 to keep client integrations from silently breaking on method conversion
For all standard GET requests — product pages, category pages, blog posts — 301 and 308 behave identically. Default to 301 for permanent moves unless you specifically need method preservation.
The Four Mistakes That Cost Stores Ranking Equity
1. Redirect chains
A redirect chain happens when URL A redirects to URL B, which redirects to URL C. Each hop dilutes link equity and adds latency. Google has stated it follows up to 10 chained redirects, but the impact on your performance and crawl budget gets worse with each hop. Audit your redirect chains regularly and flatten them: every redirect should go directly to the final destination, not via intermediate URLs.
The most common cause: layered migrations. You move /old-product to /new-product, then later move /new-product to /categories/new-product, but never update the original redirect. The chain grows.
2. Redirecting deleted products to the homepage
When a product is discontinued, the temptation is to 301 it to the homepage. Don't. The homepage isn't a relevant replacement, and Google treats irrelevant redirects as "soft 404s" — meaning the equity transfer is mostly lost. 301 to the closest matching product, the category page, or (least preferred) leave the URL live with a 404 status and a useful 404 page that helps the user find alternatives.
3. Using 302 for permanent moves
A 302 on a permanent move means Google may take weeks or months to update the canonical to the new URL. During that window, the new URL won't accumulate ranking signals as fast as it should. If the move is permanent, use 301 from day one.
4. Forgetting to update internal links after a migration
Once you've set up 301 redirects, the redirects work — but every internal link that points to the old URL is now generating a redirect on every page view. This wastes crawl budget, adds latency, and signals to Google that you don't trust your own redirects. After a migration, run a site crawl, identify all internal links pointing to redirected URLs, and update them to point directly to the new URL.
The Redirect Decision Tree
When you're about to set up a redirect, ask:
- Is the move permanent? Yes → 301 (or 308 if a method-preserving POST endpoint). No → continue.
- Is the move temporary with a known end date? Yes → 302 (or 307 if method-preserving). No → consider whether a redirect is the right move at all.
- Is the destination URL a relevant replacement for what the user expected? Yes → proceed. No → consider serving a 404 with a helpful error page instead.
How StoreVitals Audits Your Redirects
StoreVitals' link and redirect checker identifies redirect chains, broken redirects (pointing to 404s), and slow redirects on your store. Run a free scan to find redirect-related issues that may be quietly costing you ranking equity.