Skip to main content

How to automatically redirect removed products

This guide explains how to set up automatic redirects for products that are disabled or deleted, so shoppers land on a relevant page instead of a 404 error.


1. Open the configuration

Go to Stores -> Configuration -> Mirasvit extensions -> SEO general settings -> Auto-redirect for removed products.


2. Enable the triggers you need

  • Set Enable auto-redirect on disable to Yes to generate a redirect whenever a product is set to Disabled. Re-enabling the product removes the redirect automatically.
  • Set Enable auto-redirect on delete to Yes to generate a redirect when a product is permanently deleted.
tip

Both triggers can be active at the same time.


3. Configure the redirect destination

The extension resolves the redirect target in this order:

  1. The product's first active assigned category (by category tree order).
  2. The Fallback URL, if configured.
  3. The homepage (/).
  • Leave Fallback URL blank to fall back to the homepage when a removed product has no active category. Enter a relative path (e.g. /sale) or an absolute URL to send shoppers to a specific page instead.
  • Set Redirect type to the appropriate HTTP status code. Use 301 Moved Permanently to preserve link equity (recommended for SEO). Use 302 or 307 for temporary redirects.

4. Save and clear the cache

Click Save Config, then clean the Magento cache to apply the settings.


5. Review generated rules

Generated redirects appear in Marketing -> Advanced SEO Suite -> Redirects with Source set to Auto. They can be edited, deactivated, or deleted like any manual rule.

note

If a manual redirect exists for the same URL as an auto-generated one, the manual rule always wins.

Refer to the Redirects manager page for a full description of redirect settings.