Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Improve SEO with product page canonicalization

Describes how to improve SEO with canonical links in Optimizely Configured Commerce.

Because search engines give lower SEO scores to websites that have multiple pages with the same content but different URLs, using canonical links can help improve the overall Search Engine Optimization (SEO) score. By putting the same canonical link on duplicate pages, a website can tell the search engine that data about the duplicate pages should be combined together, thereby improving the SEO score. In addition, when a page from the website is shown in the results of a search engine, the canonical URL should be used in the link.

Additionally, Optimizely Configured Commerce uses canonical links when searching for products. Whether a product is selected via the autocomplete or from the search results page, the resulting product page uses the canonical URL. This is expected, as search has no real context of where the product page lives.

Example

We will use the flooring stapler product page on our Hero Tools website to show the various URLs:

When going to the stapler product page, the URL resolves to the full URL:

  • https://insite.insitesandbox.com/**Catalog/Power-Tools/Staplers**/20V-Max-Cordless-18-GA-Flooring-Stapler

Viewing the page HTML, the <head> element contains the canonical link:

  • <link rel="canonical" href="[https://insite.insitesandbox.com/**Product**/20V-Max-Cordless-18-GA-Flooring-Stapler">

Now, because the Hero flooring stapler can also shoot nails, the product page is duplicated in the Nailer category.

When going to it via the Nailer category, the URL resolves to the full URL:

  • https://insite.insitesandbox.com/**Catalog/Power-Tools/Nailers**/20V-Max-Cordless-18-GA-Flooring-Stapler

Viewing the page HTML, as expected, the <head> element contains the same canonical link as the product page found under the Stapler category:

  • <link rel="canonical" href="[https://insite.insitesandbox.com/**Product**/20V-Max-Cordless-18-GA-Flooring-Stapler">

When searching for the stapler product page, the URL resolves to the same canonical URL:

  • https://insite.insitesandbox.com/**Product**/20V-Max-Cordless-18-GA-Flooring-Stapler

To summarize, both product pages contain the same canonical link in the <head> element which informs search engines to only index the one canonicalized URL.

Attributes of canonicalization

However, if a user goes to a product via the taxonomy (categories) the resulting product page uses the actual URL path. See the example below for more details.

  • As a best practice, the canonical link tag should contain the fully qualified URL path:
    • This is correct: <link rel="canonical" href="https://insite.insitesandbox.com/Product/20V-Max-Cordless-18-GA-Flooring-Stapler">
    • This is not correct: <link rel="canonical" href="/Product/20V-Max-Cordless-18-GA-Flooring-Stapler">
  • Categories within the URL are removed from canonical links:
    • The full URL of <https://insite.insitesandbox.com/Catalog/Power-Tools/Staplers/20V-Max-Cordless-18-GA-Flooring-Stapler> is canonicalized to <https://insite.insitesandbox.com/Product/20V-Max-Cordless-18-GA-Flooring-Stapler>
  • Search results and autocomplete will show the canonicalized URL <website>/product/ProductURL
  • Canonical links will use HTTP or https depending on the HTTPS Mode Setting
  • If there are multiple domains specified for a website, the first one will be used.

Settings related to canonicalization

Go to Admin Console >Websites > select Edit for the desired website and then select the Settings fingertab.

Search for the following settings:

  • Go to Admin Console > System > Settings and search for "Product Canonical Root Path"
    • The first segment used in canonical product URLs which defaults to ‘Product’. May be blank if links should be at the root of the website. Can be overridden for specific languages within the translation dictionary by changing the translation value for the 'Product_UrlRoot' keyword in the appropriate language.
  • Go to Admin Console > System > Settings and search for " Microsite Canonical Products"
    • If Yes, products on microsites will have their own canonical URLs. If No, they will point to products on the root domain site when they exist there. Default value: No
  • Go to Admin Console > System > Settings and search for "Canonical Link for Products In Sitemap"
    • If Yes, canonical links are used for products in sitemap. If No, category product paths are used. Default value: Yes.