User Tools

Site Tools



For more details see how the Unique Product URL for Magento 2 extension works.

Ultimate Guide for Magento 2 Unique Product URL

Provide extra search engine optimization level with Unique Product URL for Magento 2. The extension allows you to avoid duplicate content issues by creating unique product URLs. With the module, you will be able to:

  • Define the length of product URL
  • Set the criteria to choose the appropriate URL length
  • Configure 301 redirect to make pages SEO friendly
  • Exclude custom categories from URLs
  • Optimize breadcrumbs

General Settings

The module requires only one Magento 2 option to be activated before starting its job. Navigate to: Stores → Configuration → Catalog → Catalog → Search Engine Optimization and set the Use Categories Path for Product URLs option to Yes.

Now, you are ready to proceed with the Unique Product URL for Magento 2 extension configuration.

To get to the extension's settings go to the Stores → Configuration → Amasty Extensions → SEO Single URL section. There are 5 options to get the module up and running.

Categories Path in Product URL — The option allows you to define the preferred length of product URLs.

  • Shortest Path — uses the shortest possible path in product URL;
  • Longest Path — uses the longest possible path in product URL;
  • Default Rule — utilizes the default Magento 2 rule for URLs, deactivates the extension.
  • URL without Categories

By — Here you can tell the extension what method to use when detecting the product URL length. Select between the URL level depth or the Number of characters options.

301 Redirect To Canonical URL — Once you have multiple URLs leading to a single product, you can activate this option to enable automatic redirect to the main canonical URL.

Exclude Category from Product URL — Using this setting you are able to specify category IDs to permanently exclude certain categories from product URLs in your store.

You need to fill in a category ID rather than its name. To find category IDs, go to the Products → Categories section. Then, select a category and check page URL in your browser for required ID.

Generate Breadcrumbs According To — This option provides you with the ability to diversify breadcrumbs on your product pages:

  • Current URL — takes the breadcrumbs elements from product URL, including all categories and subcategories;
  • Last Visited Category — displays in the breadcrumbs section only previously visited categories on the way to the product page.
Please note that the extension doesn't enable full breadcrumbs if they are not available on your site. It just changes their formation logic. For this configuration to work, full breadcrumbs should be displayed by default.

Only Included in Menu categories can be displayed in breadcrumbs.

New URL Structure

When configuration is done, the new URL structure will be the following:

Product URL has the maximum length using the URL depth level criteria. Also, breadcrumbs reflect the current URL. Each product in your store will receive unique URL. That should help you to avoid duplicate content issues and make your store search engine friendly.

Find out how to install the Unique Product URL extension for Magento 2 via Composer.

Rate the user guide
 stars  from 4 votes (Details)
magento_2/unique_product_url.txt · Last modified: 2021/10/29 12:24 by kkondrateva