Use the SEO URLs Settings Tab

Use this tab to configure locale mappings, character replacements, and search refinement settings.

  1. Select site > Merchant Tools > Site URLs > URL Rules.
    If you see the Search Support Preferences page instead of the URL Rules page General tab, navigate to Site Preferences > Storefront URLs to enable the URL Rules module.
  2. Click the Settings tab.
  3. In the Character Replacement Settings section, Salesforce recommends the following settings:
    • Lower Case: Select this to convert all product names or other information in your URL to be lower case. This prevents search engines from counting URLs with different capitalizations as duplicate content. If you don't check this box, then different capitalizations appear in the URL. This is only necessary if you have brands or products with the same spelling, but different capitalization.
      Note: Lower case setting has no effect on Product ID (abc123 vs. ABC123).
    • White Space: Select a character to replace white space in product names, brand names, or other text included in your URL. For example, if you have a product called "super shorts" with a syntax of [ category, [ category-path, [ attribute, ID ], - ] ], then the default selection is the minus symbol, as it's both brief and easily human readable. However, if you have minus signs in product or brand names, you might want to select one of the other options to replace blanks in your URLs.

    • Custom Replacements: Select this to activate custom character replacement rules. If this box isn't selected, the rules defined on the Character Replacement Rules page are disabled.
    • Custom Replacement Rules: Click Edit Rules to define URL character replacement rules. The URL Rules page Character Replacement Settings tab opens.

      Use the table below to define URL character mappings. During URL generation, the character on the left side of a mapping rule is replaced with the characters on the right side of the mapping rule.

      See URLs: Substituting Reserved and Special Characters.

      Note: if this setting is disabled, all non-ASCII and reserved characters are encoded during URL generation.
    • Character Replacement for 'pageURL': Select this to apply character replacement for URLs created with 'pageURL' override. This is selected by default.

      See Overriding Generated SEO URLs.

  4. In the Locale-Mapping section, select where you want the locale to appear in the URL:
    • None: The locale doesn't appear in the URL.
    • Hostname: The locale appears as part of the host name. You create top-level host name aliases in the alias file. You define the host names and select a locale.

      See Assigning a Hostname Alias.

    • URL Parameter: The locale appears as a URL parameter. You define both the name of the parameter and the value of each locale.

      The resulting URL looks like the following:

      http://mystore.com/s/mysite/home?lang=en_US

      Specify mappings between the locale name used in the URL and the actual locale (for example, en -> default).

    • Path: The locale appears as part of the URL path.

      This enables you to specify mappings between locale names you enter to be used in the URL and the locales recognized by Salesforce B2C Commerce.

      You can define one or two values for the locale.

      • With one value, the resulting URL looks like the following:

        http://mystore.com/s/SiteGenesis/en/mens

      • With two values, you specify the first value, the '/' character, and then the second value, for example, de/DE, which results in the following:

        http://mystore.com/s/SiteGenesis/de/DE/mens

        Only one backslash can be used.

        Note: When using two values, the locale mapping of the URL Parameter type can't contain '/'.

      These are the mapping rules:

      • The mapping can be empty.
      • The mapping segments can contain the characters 'a-z', 'A-Z', '-' and '_'.
      • The mapping can contain one '/' with the restriction that both segments can't be empty.

      The locale for any incoming URL is determined as follows:

      1. B2C Commerce finds the locale mapping for the first and second URL elements.
      2. If no mapping exists, B2C Commerce finds the locale mapping for the first element only.
      3. If no mapping exists, B2C Commerce finds the locale ID of the first URL element.
      4. If no mapping exists, B2C Commerce uses default.
    Note: You must have defined your locales before using the Locale-mapping section. Locales are defined in the Site Preferences > Locales module.
  5. In the Search Refinement URL Settings section, use the following settings to configure how you want search refinements to appear in the URL (see the examples in the Creating category and product URLs section below):

    Using this example, /brand/blue|black/new-arrivals/shoes:

    • The refinements segment delimiter is the / between black and new.
    • The refinements delimiter is the / between brand and blue.
    • The refinements value delimiter is the | between blue and black.

    Configure these settings:

    • Position: Refinements are included before or after the category/folder mapping. Before or After (default). For example, before: /blue/shoes/, after: /shoes/blue/.
    • Refinements Segment Delimiter: Define how a refinement segment is separated from a category/folder segment. / (Slash) (default), _ (Underscore), - (Minus)
    • Refinements Delimiter: Define how multiple refinements are separated. / (Slash), _ (Underscore) (default), - (Minus), period (.), plus (+)
    • Refinements Value Delimiter: Define how multiple refinement values are separated. | (Pipe)>, _ (Underscore) (default), - (Minus), period (.), plus (+)

      As of Release 16.3, the pipe "|" search refinement value delimiter is encoded in the URL path. URLs without encoded pipes in the URL path work as before.

    • Conflicting Refinements Value Delimiter: Define the delimiter used to separate the indices from the value mapping for conflicting values. (None) (default), _ (Underscore), - (Minus)
    • Exclude Pipeline Alias: Specify if you want to exclude the pipeline alias for catalog (Search-Show) or content (Search-ShowContent) search refinement URLs. Disabled (default), Catalog, or Content.
    • Product and Content Refinement Name and Value URL Parameters: Enter the URL parameters for product and content search refinement names and values. For SiteGenesis and SFRA, the default values are prefn, prefv, crefn, and crefv. In addition to updating the configuration of values, custom code changes are required to use parameters beyond the default settings.
    Note: The period (.) and plus(+) delimiters are not encoded. When either is used as a delimiter and as white-space replacement, conflicts appear in the conflict monitor.
  6. Click Apply to save your changes for each of the above sections.

Example: Use the Path Setting

B2C Commerce determines the locale mapping for the path parameter using the above-described process. For example, a merchant configures the locale mapping to Path and creates the following mappings:

Value Maps to...
en_US default
de/DE de_DE
de de
US/en en_US
  fr_CA

Using these settings, B2C Commerce maps locales with the steps as shown in the following table.

For this URL... Step Is there a mapping for... Is there a locale for...   Locale
www.mystore.com/en_US/mens... 1 en_US/mens   No  
  2 en_US   Yes default
www.mystore.com/de/DE/... 1 de/DE   Yes de_DE
www.mystore.com/US/en/... 1 US/en   Yes en_US
www.mystore.com/de/mens... 1 de/mens   No  
  2 de   Yes de
www.mystore.com/fr_CA/mens... 1 fr_CA/mens   No  
  2 fr_CA   No  
  3   fr_CA Yes fr_CA
www.mystore.com/ABCDE/mens... 1 ABCDE/mens   No  
  2 ABCDE   No  
  3   ABCDE Yes default*

* As in www.mystore.com/en_US/mens. because default is the fall-back.