Turn on SEO-Friendly URLs
As overly simplistic as this may sound, SEO-friendly URLs need to be enabled on the platform itself (see below for example). If you launched your site within the last few years, then it is most likely already using this functionality by default. However, if you’ve been on the platform for more than five or so years, you may still be on the older version of URL functionality, so it is important to double check.
A benefit of using the SEO-friendly module is that 301 redirects can be implemented automatically, without needing to manually follow the process. Once the box is ticked, the URLs are refreshed in staging, and all URLs will have 301 redirects from old version to new URLs.
How to Manage Catalog URLs in Salesforce
Location of Catalog URLs: Merchant Tools > SEO > URL Rules > Catalog URLs
Some of the key functions within this category include:
- Locale Mapping – where you can choose for it to be either: sub-folder, hostname or URL parameter
- Character Replacement Settings – the place to decide whether you’re a trailing slash, caps vs no-caps kinda site.
- White-Space – by default SFCC input a “%20” in any areas where there is whitespace in the URL, this can be overridden by specifying that you’d instead prefer a “-” in instances of whitespace. See below:
The rule found (above) will auto replace any sign of & with ‘and’, significantly improve semantic value of your URL structure, and adhere to BERT (Google algorithm update focused on addressing value between words).
Managing Category URL Rules in Salesforce
Moving into Category URL Rules. This section is where SFCC can get complicated, so it’s critical that you keep track of all category IDs (these are all unique).
This (screenshot above) is the section where you can stipulate how your URLs will look once the site goes live.
[ attribute, ID ] – URL would look as follows : /men/smart-shoes
However, you can add more to the URLs than just the end PLP.
[ category-path, [ attribute, ID ] – URL would look as follows : /men/shoes/smart-shoes
Finally, into the Product URL Rules. This is the stage where you’ll need to put your products into their relative category path, category IDs (for SFCC) and their product IDs.
[ category, [ category-path, [ attribute, ID ], / ] ] – URL looks as follows : /men/shoes/smart-shoes/5678.html
Additional setting for category URLs:
- Enable override with page URL 0 allowing you to override the generated URL
- Append trailing slash – categories are considered as directories for the purposes of SEO, and as best practice a directory should be followed by a trailing slash
- Enable category search refinement – category search refinements (filters) allow you to identify specific filters that exist on a page. Rather than those appearing as parameters in the URL, you can make them appear as clean URLs e.g.
/accessories/ties?prefn=refinementColor&prefv1=Red >>>>>>> /ties/red/
Unfortunately, the addition of .html is something that is unchangeable. In order to reduce the potential for duplication, and to reduce the complexity of the site (so that multiple URLs are created for the same product), we recommend that you assign products to the domain, rather than following the relevant category & subcategory path – this way, you’re able to use the same product in multiple different areas around your site. Therefore, a product URL would look as follows:
example-site.co.uk/cotton-training-hoodie/123456.html
Managing Pipeline URLs in Salesforce
Location of URLs: Merchant Tools > SEO > URL Rules > Pipeline URLs
What are pipelines?
- Pipelines are code-based actions that run on Commerce Cloud. For example:
- To display the cart, the action ‘Cart-Show’ runs
- To create a product list page, the action ‘Search-Show’ runs
- You can map pipelines to an ‘alias’ to create a user-friendly URL. Below example has 56 pipelines mapped e.g.:
- Cart-Show to ‘cart’: https://www.example.com/us/cart
- Search-Show to ‘search’: https://www.example.com/us/search?q=badger&lang=en_US
- Your developers can provide a list of pipelines used on your site to identify any that are unmapped – an unmapped pipeline can also be identified from its URL. For example, if Cart-Show was not mapped it would appear as:
- If it was mapped it would appear as:
-
- https://www.example.com/cart/
Unmapped pipelines will produce undesirable URLs so it is not right from an SEO perspective — we’d begin to see a large influx of unfriendly URLs picked up in the SERP, offering no value to prospecting customers, and impacting the CTR or the site.
The above image shows that aliases have not been localised.
Managing URL Conflicts in Salesforce
Location of URL Conflicts – Merchant Tools > SEO > URL Rules > General
What causes URL conflicts?
- Duplicate attribute values can cause two or more pages to try to generate the same URL.
- Commerce Cloud prevents this by appending version numbers to conflicting URLs
- www.site.com/-1/
- www.site.com/-2/
URL conflicts on category URLs can be seen below.
As the image above shows, 467 conflicting categories are found
From the image above we can see that
Two categories within offers have been given the same value for the customDisplayName used in the URL rule.
Options to correct this:
- If both categories are required: update the attribute in one or both categories to be unique.
- If only one category is required:
- Delete the one no longer required & redirect to the URL with the clean URL (which in this case is without the -1). This will reduce the implication of duplicated content found across your site.
- Or offline the one no longer required and change Category URL Rule setting to not create URLs for offline categories
Recommendation: URL Conflicts should be checked when new categories are created so conflicts can be resolved before replication.