6

While Sitecore supports SEO Friendly URLs, the Sitecore Commerce page URLs can be quite ugly. Is there a way to make these more SEO friendly?

Haven't been able to find any type of configuration setting or way of doing this.

here are some example URLs from the Habitat Home Demo site:

Category Page https://experiencecommerce.habitathomedemo.com/shop/All-In-One%3dhabitat_master-all%20in%20one

Product Detail page https://experiencecommerce.habitathomedemo.com/shop/Drones%3dhabitat_master-drones/SeekerIDrone%E2%80%9427K12MP%3d7042128

2
  • Use custom URL handling for example with the star item. Peterjustesen.com uses Commerce 9.0.2 and have SEO friendly URLs: peterjustesen.com/fashion/watches/… (the last digits after the product name is a requirement from the customer, but can easily be removed if wanted) Commented Dec 7, 2018 at 8:14
  • So we would just create a custom LinkManager and ItemResolver to make them SEO friendly just like normal? would you happen to have code example from Peterjustesen.com? Commented Dec 11, 2018 at 16:03

1 Answer 1

2

Sitecore Commerce uses own Commerce Link Manager for Commerce links.

<add name="commerce" includeFriendlyName="true" useShopLinks="true" includeCatalog="false" addAspxExtension="false" alwaysIncludeServerUrl="false" encodeNames="true" languageEmbedding="never" languageLocation="filePath" lowercaseUrls="false" shortenUrls="true" useDisplayName="false" type="Sitecore.Commerce.XA.Foundation.Catalog.Pipelines.CatalogLinkProvider, Sitecore.Commerce.XA.Foundation.Catalog" />

You can play around with parameters and choose more friendly URLs configuration.

An important note about the provider configuration properties is that only 3 properties actually affect the generated URLs – includeFriendlyName, useShopLinks, and encodeNames.

Configuration Properties:

  • includeFriendlyName: Includes the DisplayName of the category or product in the URL segment. i.e. {category DisplayName}={category FriendlyId} and {product DisplayName}={ProductId/FriendlyId}.
  • useShopLinks: Constructs URL with shop/{category}/{product} if enabled, otherwise as category/{category} and product/{product} for category and product URLs respectively.
  • includeCatalog: Not currently supported
  • addAspxExtension: N/A
  • alwaysIncludeServerUrl: N/A
  • encodeNames: Encodes the DisplayName portion of the category and product segments. Only supported when useShopLinks is true.
  • languageEmbedding: N/A
  • languageLocation: N/A
  • lowercaseUrls: Not currently supported
  • shortenUrls: Not currently supported
  • useDisplayName: Not currently supported

For more details, I recommend Andrew Sutherland's blog post:

http://andrewsutherland.azurewebsites.net/2018/12/17/configuring-and-customising-seo-friendly-urls-in-sitecore-commerce-sxa-storefront/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.