For more details see the Unique Product URL for Magento 2 extension page.
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:
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.
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.
Generate Breadcrumbs According To — This option provides you with the ability to diversify breadcrumbs on your product pages:
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.