Loading
B2B Commerce for Visualforce
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Include Locale in Canonical URLs

          Include Locale in Canonical URLs

          To support search engine bots crawling and indexing your multilingual storefront, B2B Commerce for Visualforce now includes the storefront guest user's locale in canonical URLs. The guest user's locale corresponds to a search engine bot's locale. This change helps search engines understand the authoritative version of your storefront content, even when you support multiple regions and languages.

          Where: This change applies to B2B Commerce for Visualforce Summer ’19 (version 4.11) in Lightning Experience and Salesforce Classic in Enterprise, Performance, Unlimited, and Developer editions.

          Why: Previous versions of B2B Commerce for Visualforce didn't provide any locale information in support of storefront SEO. This change complements other changes in this version to add locale-specific alternate links in page metadata.

          How: In previous versions of B2B Commerce for Visualforce, canonical URLs were inserted automatically into the <head> tag of the Home, Product List, and Product Detail pages.

          After you upgrade the available global data, a new storefront configuration setting, Enable Canonical and Alternate Language Links, is available under the User Interface module. By default, this setting is FALSE. To continue using canonical URLs after you upgrade the managed package, change this setting to TRUE.

          Important
          Important If you don't change this configuration setting, your canonical URLs are no longer inserted.

          After you enable the configuration setting, your canonical URLs include the parameter cclcl=guestUserLocale, such as en_US.

          For example, before you update the managed package, the canonical URL in a Product Detail page uses the following format by default:

          <link rel="canonical" href="https://www.mydomain.com/StorefrontName/ccrz__ProductDetails?sku=productSKU" />

          The new canonical URL path includes the cclcl=guestUserLocale parameter:

          <link rel="canonical" href="https://www.mydomain.com/StorefrontName/ccrz__ProductDetails?sku=productSKU&cclcl=en_US" />

          In addition, sitemaps also use the updated canonical URL values.

          The ccrz.cc_hk_UserInterface.canonicalUrlInclude() method supports this change. Previously, this method returned only the URL value for a page’s canonical URL. Now, this method returns the URL values for a page’s canonical URL and alternative language links for any selected storefront languages. If you previously created subscriber code to extend this method, update your code to account for the new returned information, if necessary.

           
          Loading
          Salesforce Help | Article