Canonical meta tag
Some search engines penalize websites that have multiple URLs that point to the same content. The canonical meta tag tells search engines which page to index when multiple URLs have identical or similar content. Using the canonical meta tag can improve your site ranking and aggregate page views. The canonical meta tag is placed in the <head>
block of a product or category page. It provides a link to your preferred URL, so search engines give it greater weight.
Example 1: Category path creates duplicate URLs
For example, if your catalog is configured to include the category path in product URLs, your store generates multiple URLs that point to the same product page.
Example 2: Category page full URL
When canonical meta tags for categories are enabled, the category page of your store includes a canonical URL to the full category URL:
Example 3: Product page full URL
When canonical meta tags for products are enabled, the product page includes a canonical URL to the domain-name/product-url-key because product URL keys are globally unique.
If you also include the category path in product URLs, the canonical URL remains domain-name/product-url-key. However, the product can also be accessed using its full URL, which includes the category. For example, if the product URL key is driven-backpack
and is assigned to the Gear > Bags category, the product can be accessed using either URL.
You can avoid being penalized by search engines by omitting the category from the URL, or by using the canonical meta tag to direct search engines to index either by product or category. As a best practice, it is recommended that you enable canonical meta tags for both categories and products.