After July 2021, the 2.3.x release line will no longer receive quality updates, or user guide updates. PHP 7.3 reaches end of support in December 2021 and Adobe Commerce 2.3.x reaches end of support in September 2022. We strongly recommend planning your upgrade now to Adobe Commerce 2.4.x to help maintain PCI compliance.

Automatic Product Redirects

The information on this page is intended for Adobe Commerce 2.3 customers who are on an extended support contract. The Adobe Commerce Merchant Documentation for current releases is published on the Adobe Experience League.

Your store can be configured to automatically generate a permanent redirect whenever the URL key of a product or category changes. In the Search Engine Optimization section, the checkbox below the URL key indicates if permanent redirects are enabled. If your store is already configured to automatically redirect catalog URLs, making a redirect is as easy as updating the URL key. The process to create an automatic redirect is the same for both products and categories.

When automatic redirects are enabled and you save a category, all product and category rewrites are generated in real time and stored in database tables by default. This could result in significant performance issues for categories with many assigned products. The solution is to change this default and skip the generation of category/products URL rewrites for products on category save. In this case, product rewrites are generated only for the canonical product URL.

Set Up Automatic Redirects

  1. On the Admin sidebar, go to Stores > Settings > Configuration.

  2. In left panel, expand Catalog and choose Catalog underneath.

  3. Expand Expansion selector the Search Engine Optimization section.

  4. Set Create Permanent Redirect for URLs if URL Key Changed to Yes.

  5. When complete, click Save Config.

    Catalog configuration - search engine optimization Search Engine Optimization

Automatically Redirect Product URLs

  1. On the Admin sidebar, go to Catalog > Products.

  2. Find the product in the list and click to open the record.

  3. Expand Expansion selector the Search Engine Optimization section and for the URL Key field, do the following:

    • Make sure that the Create Permanent Redirect for old URL checkbox is selected. If not, follow the instructions to enable automatic redirects.

    • Update the URL Key as needed, using all lowercase characters and hyphens instead of spaces.

    Product search engine optimization - permanent redirect Create Permanent Redirect for Old URL

  4. When complete, click Save.

  5. When prompted to refresh the cache, follow the links in the message at the top of the workspace.

    The permanent redirect is now in effect for the product and any associated category URLs.

Automatically Redirect Category URLs

  1. On the Admin sidebar, go to Catalog > Categories.

  2. Find the category in the tree and click to open the record.

  3. Expand Expansion selector the Search Engine Optimization section.

  4. For URL Key, do the following:

    • Make sure that the Create Permanent Redirect for old URL checkbox is selected. If not, follow the instructions to enable automatic redirects.

    • Update the URL Key as needed, using all lowercase characters and hyphens instead of spaces.

  5. When complete, click Save.

  6. When prompted to refresh the cache, follow the links in the message at the top of the workspace.

    The permanent redirect is now in effect for the category and any associated product URLs.

Skip Generation of Product URL Rewrites for Category Save

Turning off automatic generation of category/products URL rewrites results in permanent removal of all existing category/product type URL rewrites, which cannot be restored. This could potentially cause unresolved category/product type URL conflicts that will require a manual update of the URL key to resolve.

  1. On the Admin sidebar, go to Stores > Settings > Configuration.

  2. In left panel, expand Catalog and choose Catalog underneath.

  3. Expand Expansion selector the Search Engine Optimization section.

  4. For the Generate “category/product” URL Rewrites field, clear the Use system value checkbox and set the value to No.

    Catalog configuration - no automatic URL rewrites Generate “category/product” URL Rewrites - No

  5. In the confirmation dialog, click OK to confirm the change and the removal of existing URL rewrites.

    Turn off category/product URL rewrites - confirm
    Turn off “category/product” URL rewrites

  6. When complete, click Save Config.