How to redirect deleted products without losing rankings: if a product is gone for good, 301-redirect its URL to the closest relevant replacement, such as the new model or the most specific category it belonged to. If it is only out of stock, don’t redirect it at all; keep the page live and mark it as out of stock. Only let a URL return 404 or 410 when there is no relevant alternative and the page has no links or traffic worth keeping. Never send every deleted product to the home page: Google says that kind of mass redirect “might be treated as a soft 404 error”.
Products come and go in every online store, so this is a routine job rather than a one-off migration. This guide gives you a decision process for each situation, explains what Google does with each status code, and shows how to keep the redirect list healthy as your catalogue grows.
| Situation | What to do | Status code |
|---|---|---|
| Temporarily out of stock | Keep the page live, show availability and alternatives | 200 |
| Replaced by a newer model | Redirect to the new model | 301 (or 308) |
| Discontinued, similar products exist | Redirect to the closest product or most specific category | 301 |
| Discontinued, page still gets links or searches | Keep live as a “discontinued” page with alternatives, or redirect to the best match | 200 or 301 |
| Gone, nothing relevant to offer | Let it return an error | 404 or 410 |
| Hidden for a season, coming back | Keep live, or use a temporary redirect | 200 or 302 |
Disclosure: Optihole is an SEO agency that handles technical SEO for online stores. Our team has 6+ years in SEO and has completed 800+ SEO projects for 210+ clients in 45+ countries. This article contains no client data.
Why do deleted products cause ranking losses?
A product URL that has been live for a while may have built up rankings, external links, internal links from blogs and categories, and bookmarks from customers. When you delete the product without a plan, three things can happen:
- The URL returns a 404. Google says that URLs returning a 4xx status code “are removed from the index”, and any links pointing to that page now lead nowhere useful (Google Search Central).
- The URL is redirected somewhere irrelevant, usually the home page. Shoppers who wanted a specific product land on a generic page and leave, and Google may treat it as a soft 404.
- The URL keeps returning 200 with an error message such as “this product is no longer available” and nothing else. Google’s documentation says that if the content of a 200 page suggests an error, Search Console will show a soft 404.
None of these is a penalty. The problem is simply that the value the old URL had is not passed to a page that can use it.
What does Google do with 301, 302, 404 and 410?
- 301 and 308 (permanent): Google calls these a strong signal that the redirect target should be canonical. Use them “when you’re sure that the redirect won’t be reverted” (Google Search Central).
- 302 and 307 (temporary): a weak signal. Google keeps showing the old URL in results for longer, so these suit short-term situations only.
- 404 and 410: Google says all 4xx errors except 429 “are treated the same”. In practice there is no SEO reason to prefer 410 over 404; pick whichever your platform makes easier.
- Redirect chains: Google’s crawlers follow up to 10 redirect hops, but every hop slows users down. Point old URLs straight at the final destination.
Google also says server-side redirects have the highest chance of being interpreted correctly; meta refresh and JavaScript redirects are less reliable, so use them only when server-side redirects are not possible (Google Search Central).
How do you choose the right redirect target?
Ask what the shopper who clicked the old link was looking for, and send them to the page that best answers it. In order of preference:
- The direct replacement. The new version of the same product, or the same product under a new URL. This is the clearest case for a 301.
- A very close alternative. Same type, similar price and specification. Only use it if a shopper would genuinely accept it as a substitute.
- The most specific category. If an “oak bedside table” is discontinued, redirect it to the oak bedside tables category, not to “furniture” and not to the home page.
- A consolidated page. Google says that if content from several pages has been combined into a new single page, the old URLs can redirect to that page.
- No good match: let the URL return a proper 404 or 410 page that helps visitors search or browse, rather than forcing a misleading redirect.
Google’s site move guidance puts it plainly: “Don’t redirect many old URLs to one irrelevant single URL destination, such as the home page” (Google Search Central).
Should you redirect out-of-stock products?
Usually not. A product that will be back in stock is still the best answer for people searching for it. Instead:
- Keep the URL live with a 200 status and say clearly that it is out of stock, with an expected date if you know it.
- Offer a back-in-stock alert and show close alternatives near the top of the page.
- Update your product structured data. Google’s merchant listing documentation supports availability values such as
OutOfStock,BackOrder,PreOrderandDiscontinued(Google Search Central). Keep the markup in line with what the page shows. - Keep it in internal links where it still helps shoppers, but consider moving it lower in category sort orders.
Seasonal products are similar. If a summer range is hidden for the winter and will return with the same URLs, keeping the pages live or using a temporary redirect is more sensible than deleting and recreating them each year.
When is a 404 or 410 the right answer?
A 404 is not a failure. It is the honest answer when a page is gone and nothing else on your site matches. It is a reasonable choice when:
- the product has no replacement, no close alternative and no clearly related category;
- the URL has no meaningful external links or search traffic (check Search Console and a backlink tool first);
- the product was a test, a duplicate, or created by mistake.
Make the error page useful, with search, popular categories and contact options. Then remove the URL from your XML sitemap and internal links. If old URLs keep appearing in Search Console reports, our “Crawled, currently not indexed” guide explains how to read those reports.
Ekram did a wonderful job- he went above and beyond my requests. The data depth, the communication, professionalism and the time he worked was great. I will definitely hire him again!
Verified Fiverr client, United States, 5 stars
How do you set up product redirects on your platform?
Every major platform has a way to do this, with different limits:
- Shopify: use the URL redirects feature in the Shopify admin. Shopify’s documentation notes that you can only redirect URLs that are broken (return a 404), and that stores can create up to 100,000 redirects, or up to 20,000,000 on Shopify Plus (Shopify Help Center).
- WooCommerce and WordPress: use a redirect feature in your SEO plugin, a dedicated redirect plugin, or server-level rules. Server-level rules are fastest for very large lists.
- Other platforms and custom builds: configure 301s in the web server or CDN, and keep the list in version control.
Whatever the platform, keep a master spreadsheet with old URL, new URL, reason, date and owner. It makes audits easy and stops redirects from being lost during a theme or platform change.
How do you keep redirects healthy over time?
- Keep redirects for a long time. Google’s site move guide recommends keeping redirects “generally at least 1 year” so signals can transfer; for products with valuable links, keep them indefinitely (Google Search Central).
- Fix chains. If product A was redirected to B and B is now discontinued, update A to point at the new final target directly.
- Update internal links. Change menus, blog posts and related-product blocks to link to the new URL instead of relying on the redirect.
- Clean your sitemap. List only live, indexable URLs.
- Watch Search Console for spikes in “Not found (404)” and “Soft 404” after big catalogue changes.
- Review quarterly. A scheduled crawl catches broken links and chains before they pile up.
If you are seeing many of these issues at once, it may be one of the signs you need technical SEO. For large catalogues, strong category and collection pages also give discontinued products a natural place to redirect to.
Frequently asked questions
Should I redirect deleted products to the home page?
No. Google warns that redirecting many old URLs to one irrelevant page such as the home page can confuse users and may be treated as a soft 404. Redirect to the closest relevant product or category instead.
Is 404 or 410 better for SEO?
Google says all 4xx errors except 429 are treated the same, so neither has an SEO advantage. Use the one your platform supports.
Should out-of-stock products be redirected?
Generally no. Keep the page live, show that it is out of stock, offer alternatives, and update the availability in your structured data.
How long should I keep product redirects?
Google recommends keeping redirects generally at least one year after a URL change. For URLs with valuable external links, keeping them permanently is safer.
Does a 301 redirect pass rankings to the new page?
Google treats a 301 as a strong signal that the target should be the canonical URL. The new page can benefit if it is a relevant replacement, but rankings are never guaranteed to carry over exactly.
What about products with many variants?
If only one size or colour is gone, keep the main product page and remove the variant option. Redirect only when the whole product is discontinued.
Final thoughts
Knowing how to redirect deleted products comes down to one question: where would the shopper who clicked this link be happiest? Redirect permanently to a true replacement or close category, keep temporarily unavailable products live, let truly dead URLs return a clean 404, and keep a redirect log so nothing gets lost.
Lost rankings after removing products? Ask us for a redirect and indexing check (choose “SEO” in the form). We will review your removed URLs, redirects and Search Console reports and show what to fix first. Technical catalogue work is part of our ecommerce SEO services; see all our services.
Sources
- Google Search Central: How HTTP status codes, and network and DNS errors affect Google Search
- Google Search Central: Redirects and Google Search
- Google Search Central: Site moves with URL changes
- Google Search Central: Merchant listing (Product, Offer) structured data
- Shopify Help Center: URL redirects