Create Search-Friendly URLs

Search-friendly URLs are a shorter form of the section of the standard Salesforce B2C Commerce URL after the host name. For SEO purposes, it's important to adjust the URL settings to create search-friendly URLs across your site. The standard B2C Commerce URL is not optimized for external search engines. Instead, it includes instance, pipeline, and other information.

External search engines generally assign lower ranking to lengthy URLs with multiple directory layers and parameters or refuse to crawl them entirely. Search-friendly URLs are human-readable and shorter than standard B2C Commerce URLs, and are ranked better by search engines in organic search results.

Search-friendly URLs are generated based on a pattern that you supply. If you don't supply a pattern, B2C Commerce provides a default pattern. In addition to supplying the pattern for the URL, you can further customize your URLs using custom pipelines.

Note: It isn't possible to completely remove the section of the URL after the hostname, because there is no way to navigate to the page without it. Also, this isn't desirable, because it doesn't let crawlers index keywords that are meaningful to the page.

For information about the order in which B2C Commerce uses page-specific, category, and default URLs, see How B2C Commerce Assigns Page URLs.

You can use Business Manager to set default values and enter unique attributes as appropriate for high priority pages and content. Avoid using meaningless numbers such as product IDs. Page-specific URLs override the default URLs. For example, if you want to have a category whose default URL shows as "Navigation Systems" instead show as "GPS systems" in the URL, you can specify it in the category attributes and this overrides the default URL.

For your sitemap to include search-friendly URLs, you must enable them before creating your sitemap. Salesforce recommends that you enable search-friendly URLs for your Production instance but not your Staging instance, because it makes it difficult to add content asset links based on URLs you want to link to.

See Enabling Search-Friendly URLs.

Before enabling search-friendly URLs, you must assign an alias to your site, otherwise, URLs don't appear correctly in your storefront.
Important: B2C Commerce's implementation of search-friendly URLs, as described on this page, is now deprecated and replaced with the URL Rules module. Salesforce recommends that you use this new methodology.

To Customize Search-Friendly URLs

  1. Select site > Merchant Tools > SEO > URL Rules.
  2. Make sure Enable Search Friendly URLs is selected (this functionality is deprecated).
    Note: Deselect Enable Storefront URLs on the Storefront URL Preferences page. See Enabling Search Friendly URLs.
  3. Add values to the following fields:
    • Default Page URL for Categories: If nothing is specified the default is ${pageURL||displayName}. This uses the Page URL and Display Name attributes to construct the default URL. If you want to create a custom URL, supported category attributes include pageURL, pageTitle, ID, and displayName.
    • Default Page URL for Products: If nothing is specified the default is ${pageURL||name}. This uses the Page URL and product Name attributes to construct the default URL. If you want to create a custom URL, supported product attributes are pageURL, pageTitle, productID, name, brand, and shortDescription.
    • Default Page URL for Content Pages: If nothing is specified the default is ${pageURL||name}. This uses the Page URL and content Name attributes to construct the default URL. If you want to create a custom URL, supported content attributes are pageURL, pageTitle, ID and name.
  4. In the Substitute blanks in the URLs with: field, specify the value you want to use: %20,+, _, -, ..
  5. Click Apply.

For information on other customizations, including alternative encodings for search-friendly URLs, see URL Syntax.

Automatic Redirects

B2C Commerce performs an automatic redirect for out-dated URLs (for example, for changed marketing text) from long URLs on/ to SearchFriendlyURLs, as shown in the following example:


Is redirecting to


To View Search-Friendly URLs:

Tip: In your storefront, if you hover over a category link, you can see the URL in the status bar. If you click the link, you can see the URL at the top of the browser.

Example: Search-Friendly URLs

The following URLs are taken from the SiteGenesis application. You can see these specific URLs by looking at the storefront for the Reference Application when search-friendly URLs are disabled and enabled.

Standard B2C Commerce URLs with search-friendly URLs disabled:

Standard B2C Commerce URLs with search-friendly URLs enabled:

X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.