---
schema_version: "1"
id: aced4a103be791a0702a00290b1837397c78246c7ac6f858ce29a347b6caa016
title: URL Rules URL Syntax
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/cc/264-0-0/b2c_url_rules_url_syntax.md
canonical_url: https://help.salesforce.com/s/articleView?id=cc.b2c_url_rules_url_syntax.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 427ff78abf264727b1b4c888d363067e2fc4c107ce67cba8b59f4ffdf9841620
description: "Define how your storefront URLs look in B2C Commerce via two types of URL syntax: standard B2C Commerce URL syntax or SEO URL syntax. The syntax you use depends on which Business Manager module you have enabled."
products:
  - Commerce
  - B2C Commerce
release: "264"
---
# URL Rules URL Syntax

Define how your storefront URLs look in B2C Commerce via two types of URL syntax: standard B2C Commerce URL syntax or SEO URL syntax. The syntax you use depends on which Business Manager module you have enabled.

- If you don't specify URL syntax, the B2C Commerce standard URL syntax is used.
- If you enable the [URL Rules](https://help.salesforce.com/s/articleView?id=cc.b2c_using_url_rules_for_seo.htm&release=264.0.0&type=5 "To increase site traffic, optimize your B2C Commerce site URLs for external search engines, such as Google or Yahoo. If you’re creating a site, URL Rules are automatically enabled and you can configure them if you have permissions to the URL Rules module. Salesforce recommends configuring and testing URL Rules on a Sandbox before exporting them to Staging and replicating them to Production.") module, then the syntax configured for the URL Rules module is used. See [Configuring Storefront URL Preferences.](https://help.salesforce.com/s/articleView?id=cc.b2c_configuring_storefront_url_preferences.htm&release=264.0.0&type=5 "Enable your SEO URL rules for a B2C Commerce site.")

This page describes the URL rules syntax, and illustrates how it differs from the standard syntax.

## Site URL Format

The site URL format is defined as follows:

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
        </colgroup>
        <tbody>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_opp_wv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_opp_wv5_gwb"><!-- --></a><code>&lt;hostname&gt;/&lt;endpoint&gt;</code></pre>
            </td>

            <td class="slds-cell-wrap" style="vertical-align:top;">
              <p>This is the URL for any host name that end in
                <code>your.instance.hostname.example.com</code>.
              </p>
              <p style="margin-bottom:0;">Example: <code>yoursite.com/mens</code>
              </p>
            </td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_ppp_wv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_ppp_wv5_gwb"><!-- --></a><code>your.instance.hostname.com/s/&lt;site-name&gt;/&lt;endpoint&gt;</code></pre>
            </td>

            <td class="slds-cell-wrap" style="vertical-align:top;">
              <p style="margin-bottom:0;">This is the URL for any host name ending in
                <code>your.instance.hostname.example.com</code> or localhost.
              </p>
            </td>

          </tr>
        </tbody>
      </table>

Within B2C Commerce, configure and customize the endpoint of a URL.

## Production instance URLs

On Production instances, B2C Commerce URLs look as follows:

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d209191e133">Example Type</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d209191e136">URL</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Example Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e133 ">pipeline URL</td>

            <td data-label="URL" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e136 ">
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_dfr_xv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_dfr_xv5_gwb"><!-- --></a><code>www.SiteGenesis.com/cart</code></pre>
            </td>

          </tr>
          <tr class="">
            <td data-label="Example Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e133 ">category URL</td>

            <td data-label="URL" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e136 ">
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_efr_xv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_efr_xv5_gwb"><!-- --></a><code>www.SiteGenesis.com/men</code></pre>
            </td>

          </tr>
          <tr class="">
            <td data-label="Example Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e133 ">product URL</td>

            <td data-label="URL" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e136 ">
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_ffr_xv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_ffr_xv5_gwb"><!-- --></a><code>www.SiteGenesis.com/shoes/sandals/red/water-sandal.html</code></pre>
            </td>

          </tr>
          <tr class="">
            <td data-label="Example Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e133 ">custom URL</td>

            <td data-label="URL" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e136 ">
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_gfr_xv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_gfr_xv5_gwb"><!-- --></a><code>www.SiteGenesis.com/entertain</code></pre>
            </td>

          </tr>
        </tbody>
      </table>

## Sandbox, Staging, and Development Instance URLs

Define an alias (`your.instance.hostname.example.com`) on a Staging, Development, or Sandbox instance. URLs have `your.instance.hostname.example.com` as the host name, followed by the prefix `/s`, followed by the site name. The actual endpoint is identical to the one on the Production instance. This allows multi-site retailers to view the configured endpoints for each of their sites.

If a custom hostname like `example.com` is used in the aliases file, the URLs doesn’t require the pattern with the `/s` and site id in path and a short URL is created like `example.com/cart`.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d209191e234">Example Type</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d209191e237">URL</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Example Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e234 ">pipeline URL</td>

            <td data-label="URL" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e237 ">
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_ub1_yv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_ub1_yv5_gwb"><!-- --></a><code>your.instance.hostname.example.com/s/SiteGenesis/cart</code></pre>
            </td>

          </tr>
          <tr class="">
            <td data-label="Example Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e234 ">category URL</td>

            <td data-label="URL" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e237 ">
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_vb1_yv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_vb1_yv5_gwb"><!-- --></a><code>your.instance.hostname.example.com/s/SiteGenesis/men</code></pre>
            </td>

          </tr>
          <tr class="">
            <td data-label="Example Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e234 ">product URL</td>

            <td data-label="URL" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e237 ">
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_wb1_yv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_wb1_yv5_gwb"><!-- --></a><code>your.instance.hostname.example.com/s/SiteGenesis/shoes/sandals/red/water-sandal.html</code></pre>
            </td>

          </tr>
          <tr class="">
            <td data-label="Example Type" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e234 ">custom URL</td>

            <td data-label="URL" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e237 ">
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_xb1_yv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_xb1_yv5_gwb"><!-- --></a><code>your.instance.hostname.example.com/s/SiteGenesis/entertain</code></pre>
            </td>

          </tr>
        </tbody>
      </table>

## General Syntax Tips

To understand how requesting URLs are evaluated and resolved, see [URL Evaluation and Resolution](https://help.salesforce.com/s/articleView?id=cc.b2c_url_evaluation_and_resolution.htm&release=264.0.0&type=5 "When a customer enters a URL into their browser navigation bar, B2C Commerce evaluates the URL and resolves it in this sequence.").

URLs can be resolved even if there are case differences in the URL.

URLs can be resolved if the following unencoded characters are in the URL, because B2C Commerce automatically encodes them:

```
, @ ) ! $ ' (  ~
```

The use of spaces in a URL rule is for readability only. The absence of spaces around rule elements makes no difference whether your URL rule verifies. Commas however, are important because they separate the elements. The absence of a comma can determine whether your rule verifies.

When defining URL rules, be aware of context when you specify the source of the attributes. For a category rule, the source is a _category,_ so use a rule such as the following:

```
[ [ constant, const ], /, [ category-path, [ attribute, ID ], - ]]
```

In this rule, you are defining a constant and the category path to be used in every URL. The _attribute_ in this rule is an attribute of the _category,_ and thus the category ID.

In a product rule, however, the source is a _product,_ so you declare _category_ as source for category-path, as in the following rule:

```
[ [ constant, const ], /, [ category, [ category-path, [ attribute, ID ], - ] ]]
```

If you define the following product rule, then the constant `const111` applies as a constant and category applies as you have specified in the category rule.

```
[ [ constant, const111 ], /, [ category] ]
```

Be careful when defining the product rule because any usage of _category_ is as you defined it in the category rule. For example, if you specify the _category_ rule to result in `/const222/electronics/` and then you use `[ [ constant, const111 ], /, [ category] ]` to define a product rule, then the results are as follows:

```
/const111/const222/electronics/008884303996.html 
```

## Multi-Value Attributes

When configuring SEO rules to generate URLs for products, content, categories, and folders, specify multi-value attributes using the `Enum-of-String` and `Set-of-String` types in a way that is similar to single-value attributes. In the following example, _color_ is an `Enum-of-String` product attribute.

```
[ [ category, [ attribute, displayName ] ], /, [ attribute, custom.color], /, [ attribute, name ] ] 
```

All values of the multi-value attribute are included into the URL. The values are concatenated by a blank, or the defined replacement character of blank (for example ‘-‘). The localized display value is used for the Enum values, unless no display value is defined, in which case the value is used.

An example URL, generated based on the preceding rule, is as follows:

```
/mens-shoes/black-yellow/spring-sneaker/12345.html   
```

## Category URLs

URL Rules site URLs can be enabled for category pages, and merchants can configure the category URL endpoints on the URL Rules page Catalog URLS tab.

A standard B2C Commerce category URL with all SEO modules disabled follows this format:

```
www.sitegenesis.com/on/demandware.store/Sites-SiteGenesis-Site/default/Search-Show?cgid=mens-clothing-shorts
```

A category URL with the URL Rules module enabled follows this format:

```
[ category-path, [ attribute, displayName ], - ] 
```

This rule shows the category path and display name for the category, with a dash for the delimiter for spaces in the category name:

```
www.sitegenesis.com/mens-clothing-shorts
```

To define the content of a category URL, combine multiple elements and specify the delimiters between the elements.

```
[ [attribute_1], del , [attribute2], del , [attribute_3] ]
```

The rule can contain up to five elements. Category elements have four types: attributes, constant, category-path, category-parent. (See below for a specification of each of those element types.)

Examples:

```
[ [constant, shop], / , [category-path, [attribute, ID], -] ]
```

```
www.sitegenesis.com/shop/mens-clothing-shorts/ 
```

If you would like to exclude certain categories or folders from the URLs, you can use the path exclusion category syntax.

A simple syntax of:

```
[ category-path, [attribute, displayName], /, [3,4]]
```

takes a category tree of brand > sale > men > shoes > leather, and displays the URL as:

```
www.sitegenesis.com/brand/sale/leather
```

This syntax is available for configuration for the following URL rule attributes:

- category-path
- category-path-with-offline
- folder-path
- folder-path-with-offline

The following configuration options are available to define category URLs:

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d209191e498">Option</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d209191e501">Definition</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Option" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e498 ">attribute</td>

            <td data-label="Definition" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e501 ">
              <p>This element is used to include any attribute of the category or folder,
                such as ID, name, or any custom attribute. A default value can be defined
                and is used if either the attribute or the attribute value is undefined for
                the category. If no default value is specified, the parameter is omitted
                from the URL. </p>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_rcm_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_rcm_zv5_gwb"><!-- --></a><code>[ attribute, custom.categoryURL ]</code></pre>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_scm_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_scm_zv5_gwb"><!-- --></a><code>www.sitegenesis.com/mens-shorts</code></pre>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_tcm_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_tcm_zv5_gwb"><!-- --></a><code>[ [category-path, -], / , [attribute, custom.url_param] ] </code></pre>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_ucm_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_ucm_zv5_gwb"><!-- --></a><code>www.sitegenesis.com/mens-clothing-shorts/custom </code></pre>
            </td>

          </tr>
          <tr class="">
            <td data-label="Option" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e498 ">category-parent</td>

            <td data-label="Definition" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e501 ">
              <p>This element is used to include the name or other attribute of a category
                and of its direct parent category. Specify the attribute and the
                delimiter.</p>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_vcm_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_vcm_zv5_gwb"><!-- --></a><code>[ category-parent, [attribute, ID], - ]</code></pre>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_wcm_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_wcm_zv5_gwb"><!-- --></a><code>www.sitegenesis.com/clothing-shorts</code></pre>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_xcm_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_xcm_zv5_gwb"><!-- --></a><code>[ category-parent, [attribute, displayName], / ]</code></pre>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_ycm_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_ycm_zv5_gwb"><!-- --></a><code>www.sitegenesis.com/clothing/shorts</code></pre>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_zcm_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_zcm_zv5_gwb"><!-- --></a><code> [ category-parent, [attribute, custom.customURLName], + ] </code></pre>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_adm_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_adm_zv5_gwb"><!-- --></a><code>www.sitegenesis.com/clothing+shorts</code></pre>
            </td>

          </tr>
          <tr class="">
            <td data-label="Option" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e498 ">category-parent-with-offline</td>

            <td data-label="Definition" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e501 ">
              <p>This element is used to include the name or other attribute of an offline
                category and of its direct offline parent category. Specify the attribute
                and the delimiter.</p>
              <div>
                <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_bdm_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_bdm_zv5_gwb"><!-- --></a><code>[ category-parent-with-offline, [attribute, ID], - ]</code></pre>
                <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_cdm_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_cdm_zv5_gwb"><!-- --></a><code>www.sitegenesis.com/sale/clothing-shorts</code></pre>
                <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_ddm_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_ddm_zv5_gwb"><!-- --></a><code>[ category-parent-with-offline, [attribute, displayName], / ]</code></pre>
                <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_edm_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_edm_zv5_gwb"><!-- --></a><code>www.sitegenesis.com/sale/clothing/shorts</code></pre>
                <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_fdm_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_fdm_zv5_gwb"><!-- --></a><code> [ category-parent-with-offline, [attribute, custom.customURLName], + ] </code></pre>
                <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_gdm_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_gdm_zv5_gwb"><!-- --></a><code>www.sitegenesis.com/sale/clothing+shorts</code></pre>
              </div>
            </td>

          </tr>
          <tr class="">
            <td data-label="Option" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e498 ">category-path</td>

            <td data-label="Definition" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e501 ">
              <p>This element type is used to include the name or other attribute of a
                category and all of its parent categories. Specify the attribute and the
                delimiter.</p>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_hdm_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_hdm_zv5_gwb"><!-- --></a><code>[ category-path, [attribute, ID], - ]</code></pre>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_idm_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_idm_zv5_gwb"><!-- --></a><code>www.sitegenesis.com/mens-clothing-shorts</code></pre>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_jdm_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_jdm_zv5_gwb"><!-- --></a><code>[ category-path, [attribute, displayName], / ]</code></pre>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_kdm_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_kdm_zv5_gwb"><!-- --></a><code>www.sitegenesis.com/mens/clothing/shorts</code></pre>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_ldm_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_ldm_zv5_gwb"><!-- --></a><code>[ category-path, [attribute, custom.customURLName], + ]</code></pre>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_mdm_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_mdm_zv5_gwb"><!-- --></a><code>www.sitegenesis.com/mens+clothing+shorts </code></pre>
              <div>
                <p>Using the configurable path exclusion URL logic, use the following syntax:</p>
                <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_ndm_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_ndm_zv5_gwb"><!-- --></a><code>[ category-path, [attribute, displayName], /, [2]] </code></pre>
                <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_odm_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_odm_zv5_gwb"><!-- --></a><code>www.sitegenesis.com/mens/shorts </code></pre>
              </div>
            </td>

          </tr>
          <tr class="">
            <td data-label="Option" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e498 ">category-path-with-offline</td>

            <td data-label="Definition" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e501 ">
              <p>This element type is used to include the name or other attribute of an
                offline category and all of its offline parent categories. You can
                specify the attribute and the delimiter.</p>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_pdm_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_pdm_zv5_gwb"><!-- --></a><code>[ category-path-with-offline, [attribute, ID], - ]</code></pre>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_qdm_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_qdm_zv5_gwb"><!-- --></a><code>www.sitegenesis.com/sale/mens-clothing-shorts</code></pre>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_rdm_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_rdm_zv5_gwb"><!-- --></a><code>[ category-path-with-offline, [attribute, displayName], / ]</code></pre>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_sdm_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_sdm_zv5_gwb"><!-- --></a><code>www.sitegenesis.com/sale/mens/clothing/shorts</code></pre>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_tdm_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_tdm_zv5_gwb"><!-- --></a><code>[ category-path-with-offline, [attribute, custom.customURLName], + ]</code></pre>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_udm_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_udm_zv5_gwb"><!-- --></a><code>www.sitegenesis.com/sale/mens+clothing+shorts </code></pre>
            </td>

          </tr>
          <tr class="">
            <td data-label="Option" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e498 ">constant</td>

            <td data-label="Definition" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e501 ">
              <p>This element is used to include an arbitrary text element. </p>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_vdm_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_vdm_zv5_gwb"><!-- --></a><code>[ [ constant, cat ], /, [ category-path, [ attribute, ID ], + ] ]</code></pre>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_wdm_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_wdm_zv5_gwb"><!-- --></a><code> www.sitegenesis.com/cat/mens+mens-clothing+mens-clothing-shorts/custom </code></pre>
            </td>

          </tr>
          <tr class="">
            <td data-label="Option" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e498 ">displayName</td>

            <td data-label="Definition" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e501 ">This element is used to specify the display name of an
              attribute.</td>

          </tr>
          <tr class="">
            <td data-label="Option" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e498 ">folder-parent</td>

            <td data-label="Definition" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e501 ">
              <p>This element type is used to include the name or other attribute of a
                folder and its direct parent folder. Specify the attribute and the
                delimiter.</p>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_xdm_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_xdm_zv5_gwb"><!-- --></a><code>[ folder-parent, [ attribute, displayName ], / ]</code></pre>
            </td>

          </tr>
          <tr class="">
            <td data-label="Option" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e498 ">folder-parent-with-offline</td>

            <td data-label="Definition" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e501 ">
              <p>This element type is used to include the name or other attribute of an
                offline folder and its direct offline parent folder. Specify the
                attribute and the delimiter.</p>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_ydm_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_ydm_zv5_gwb"><!-- --></a><code>[ folder-parent-with-offline, [ attribute, displayName ], / ]</code></pre>
            </td>

          </tr>
          <tr class="">
            <td data-label="Option" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e498 ">folder-path</td>

            <td data-label="Definition" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e501 ">
              <p>This element type is used to include the name or other attribute of a
                folder. Specify the attribute and the delimiter.</p>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_zdm_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_zdm_zv5_gwb"><!-- --></a><code>[ folder-path, [ attribute, displayName ], / ]</code></pre>
              <div>
                <p>Using the configurable path exclusion URL logic, use the following syntax:</p>
                <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_a2m_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_a2m_zv5_gwb"><!-- --></a><code>[ folder-path, [ attribute, displayName ], /, [2]]</code></pre>
                <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_b2m_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_b2m_zv5_gwb"><!-- --></a><code>www.sitegenesis.com/mens/shorts </code></pre>
              </div>
            </td>

          </tr>
          <tr class="">
            <td data-label="Option" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e498 ">folder-path-with-offline</td>

            <td data-label="Definition" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e501 ">
              <p>This element type is used to include the name or other attribute of an
                offline folder. Specify the attribute and the delimiter.</p>
              <div>
                <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_c2m_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_c2m_zv5_gwb"><!-- --></a><code>[ folder-path-with-offline, [ attribute, displayName ], / ]</code></pre>
              </div>
              <div>
                <p>Using the configurable path exclusion URL logic, use the following syntax:</p>
                <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_d2m_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_d2m_zv5_gwb"><!-- --></a><code>[ folder-path-with-offline, [ attribute, displayName ], /,[2]]</code></pre>
                <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x" id="b2c_url_rules_url_syntax__codeblock_e2m_zv5_gwb"><a name="b2c_url_rules_url_syntax__codeblock_e2m_zv5_gwb"><!-- --></a><code>www.sitegenesis.com/mens/shorts </code></pre>
              </div>
            </td>

          </tr>
        </tbody>
      </table>

A setting is provided to optionally append a trailing slash to category URLs in the URL Rules page Catalog URLs tab.

```
www.sitegenesis.com/mens-shorts (trailing slash off)
```

```
www.sitegenesis.com/mens-shorts/ (trailing slash on) 
```

If a site is localized, then a separate URL exists for each site locale, for example:

```
www.sitegenesis.com/en/mens-clothing-shorts
```

```
www.sitegenesis.com/de/herren-kleidung-shorts
```

Control how the locale is specified for the URL in the URL Rules page Settings tab. Set whether your sites are localized using the Global Preferences Locales page.

URL generation behavior for rules using a category path typically skips offline categories, which can result in categories flagged as conflicting, even when they actually are not in conflict. This can occur when a merchant needs to keep categories offline until a specific event. They typically use a standard structure for subcategory names within each event-related category, for example, MothersDay/sale, ValentinesDay/sale, Easter/sale.

For example:

- Category A (offline) has a subcategory `a-sale` with display name `SALE`. When A changes to online, the a-sale category has the URL `a/sale`.
- Category B (offline) has a subcategory `b-sale` with display name `SALE`. When B changes to online, the b-sale category has the URL `b/sale`.

Because both A and B are offline, a-sale and b-sale have the same URL `sale`. This pollutes the URL conflicts log with wrongly identified conflicts, making it difficult to identify genuine URL conflicts.

Define rules that obtain information from offline categories/folders, as shown in these examples:

```
[ category-path-with-offline, [ attribute, displayName ], / ]
[ category-parent-with-offline, [ attribute, displayName ], / ]
[ folder-path-with-offline, [ attribute, displayName ], / ]
[ folder-parent-with-offline, [ attribute, displayName ], / ]
```

For example, the _sale_ category is offline, and this is the category taxonomy:

```
host.com/sale/mens
host.com/mens
```

When offline categories are recognized, the results are not in conflict: no URL conflict resolution is required.

```
host.com/sale/mens
host.com/mens
```

When offline categories are _not_ recognized, conflicts result, which can be handled via URL conflict resolution.

```
host.com/mens-1
host.com/mens-2 
```

Based on the category URL rule, B2C Commerce automatically generates category URLs. You can also define the URL endpoint for any category.

For example, the following rule:

`[ attribute, displayName ]`

leads to a conflict for the Sale category by clicking App Launcher ![App Launcher](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/cc/b2c_merchandiser_administrator/images/appLauncher.png), and then going to **Mens** | **Clothing** | **Sales** and **Womens** | **Clothing** | **Sales**, and the URL generator automatically appends an index number to the generated URLs: Override the generated URLs for **Mens** | **Clothing** | **Sales** or **Woens** | **Clothing** | **Sales**. The PageURL attribute for the category is used as the endpoint, instead of the endpoint generated by the rule.

- Generated URL of **Mens** | **Clothing** | **Sales**: `www.sitegenesis.com/sales-1`
- Generated URL of **Womens** | **Clothing** | **Sales**: `www.sitegenesis.com/sales-2`

Example 1: Men’s Sales

Assume the generated URL of **Mens** | **Clothing** | **Sales** is:

```
www.sitegenesis.com/sales-1 
```

However, if you set the PageURL attribute of the **Mens** | **Clothing** | **Sales**category to `mens-sales`, then the actual URL of **Mens** | **Clothing** | **Sales**is:

```
www.sitegenesis.com/mens-sales 
```

Example 2: Women’s Sales

Assume the generated URL of **Womens** | **Clothing** | **Sales** is:

```
www.sitegenesis.com/sales-2 
```

However, if you populate the PageURL attribute for the category **Womens** | **Clothing** | **Sales** with `womens-sales`, then the actual URL of **Womens** | **Clothing** | **Sales** is:

```
www.sitegenesis.com/womens-sales
```

## Product URLs

URLs can be enabled for product pages. The product URL endpoints are configured based on a simple rule syntax.

Product URLs are enabled using a preference in Business Manager and configured on the URL Rules Page Catalog URLs tab. In the following example, a product URL contains its category, its name, and the product ID. The product ID is mandatory and is appended to each product URL, along with the extension .html.

URL Rule:

```
 [ [category], /, [ attribute, name ] ]
```

Example URL:

```
www.sitegenesis.com/mens-clothing-shorts/straight-fit-shorts/8353682.html 
```

You can configure if the delimiter in front of the product ID is '/' or '-'. If the delimiter is '-', but a product name contains '-', then B2C Commerce automatically uses the '/' delimiter for the URL of this product. `www.sitegenesis.com/crowne-shorts-brown/83536828.html` instead of `www.sitegenesis.com/crowne-shorts-brown-83536828.html`

To define the content of a product URL, combine multiple elements and specify the delimiters between the elements.

```
[ [attribute_1], del , [attribute2], del , [attribute_3] ] 
```

The rule can contain up to five elements. Elements have two types: attributes and category.

The following configuration options are available to define product URL endpoints:

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col>
          <col>
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d209191e1092">Option</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d209191e1095">Definition</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Option" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e1092 ">category</td>

            <td data-label="Definition" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e1095 ">
              <p>Examples :</p>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>[ ]</code></pre>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>www.sitegenesis.com/83536828.html</code></pre>
              <p>For the following rule, select the <var>Use '-' as Product ID
                  separator instead of '/'</var> checkbox.</p>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>[ [category], - , [attribute, name] ]</code></pre>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>www.sitegenesis.com/shop/mens-clothing-shorts-beach-shorts-83536828.html </code></pre>
              <p>If the checkbox isn't selected, you see the following:</p>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>www.sitegenesis.com/shop/mens-clothing-shorts-beach-shorts/83536828.html</code></pre>
            </td>

          </tr>
          <tr class="">
            <td data-label="Option" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e1092 ">attribute</td>

            <td data-label="Definition" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e1095 ">
              <p>This element is used to include category information. Examples The
                category URL as generated by the category URL generator (see previous
                section). This rule must be used when the URL is supposed to show the
                product in category context. </p>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>[category]</code></pre>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>www.sitegenesis.com/mens+clothing+shorts/83536828.html</code></pre>
              <p>
                The display name of the category. </p>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>[ [category, [attribute, displayName]] ]</code></pre>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>www.sitegenesis.com/shorts/83536828.html</code></pre>
              <p> The URL name
                of the category and an extra custom attribute of the category. </p>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>[ [category], / , [category, [attribute, customAttr] ]</code></pre>
              <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>www.sitegenesis.com/mens+clothing+shorts/custom-cat-value/83536828.html </code></pre>
            </td>

          </tr>
          <tr class="">
            <td data-label="Option" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e1092 ">constant</td>

            <td data-label="Definition" class="slds-cell-wrap" style="vertical-align:top;" headers="d209191e1095 ">
              <p>This element is used to include an arbitrary text element.</p>
              <div>
                <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>[ constant, cat ]</code></pre>
              </div>
              <div>
                <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>www.sitegenesis.com/cat/83536828.html</code></pre>
              </div>
              <p>You can also use the category with the constant element.</p>
              <div>
                <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>[ [ constant, cat ], /, [category] ]</code></pre>
              </div>
              <div>
                <pre class="line-numbers slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium slds-scrollable_x"><code>www.sitegenesis.com/cat/shorts/83536828.html</code></pre>
              </div>
            </td>

          </tr>
        </tbody>
      </table>

B2C Commerce determines the category in the URL using the following logic:

1. Use the primary category of the product in the storefront catalog.
    
    If the product doesn't have a primary category assigned or the primary category doesn't exist in the storefront catalog, move to the next step.
2. Use the classification category of the product in the storefront catalog.
    
    If the product doesn't have a classification category assigned or the classification category does not exist in the storefront catalog, move to the next step.
3. Use the first category in the storefront catalog ever assigned to the product. The product must be assigned to at least one category in the storefront catalog to be available on the site.

Similar to category URLs, to override product URLs generated by the URL generator, use the PageURL attribute.

Generated URL of product: `www.sitegenesis.com/sports-shoe-red/1234.html`

PageURL attribute of product: `mckenzie-sports-shoe`

Actual URL of **Mens** | **Clothing** | **Sales**: `www.sitegenesis.com/mckenzie-sports-shoe/1234.html`  

## Content and Folder URLs

URL definition/generation for folders and content assets functions the same way as categories and products. See the URL Rules page, Content URLs page in Business Manager for folder and content URL rule examples.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/images/icon_note.png)

Note Folders don't generally have a landing page, nor are they usually rendered as part of other pages on the storefront. However, if you specify a URL syntax for them, the URLs that generate can conflict with category URLs. For example, for gift registry or sale. For this reason, you might not want to specify a URL syntax for folders. The same doesn't hold true for content assets and therefore Salesforce recommends that you optimize your content asset URLs.

## Pipeline Aliases

All page URLs except product, category, and content pages show a pipeline in the URL. For pipeline pages, to create URLs that don't contain `/on/demandware.store`, map a pipeline name to an alias in Business Manager. Pipeline page URLs look similar to:

`www.sitegenesis.com/on/demandware.store/Sites-SiteGenesis-Site/default/Account-Show`

`www.sitegenesis.com/on/demandware.store/Sites-SiteGenesis-Site/default/Search-Show?q=shoes`

In Business Manager, define mappings for any of your pipelines.

 
| URL | Pipeline |
| --- | --- |
| account | Account-Show |
| search | Search-Show |
| wishlist | Wishlist-Show |

If new URLs are turned on, and a mapping has been defined for a pipeline, the URL changes to the following format:

```
www.sitegenesis.com/account
www.sitegenesis.com/search?q=shoes
```

## Locale

To control if and how the locale/language identifier appears in all storefront URLs, select a locale option: None, Hostname, URL Parameter, or Path.

The **None** option is used if the site has only one presentation language. Incoming URLs are not examined for any language identifier. All pages are delivered in the site default locale. B2C Commerce assumes that there is only one allowed site locale, but if there are multiple, the default one is used. Generated URLs don't contain any locale identifier.

```
www.example.com/mens 
```

For **Hostname**, the presentation language is determined by examining the host name of the incoming URL. Configure a mapping between host names and site locales, for example de.example.com - de\_DE, www.example.com - en\_US, es.example.com - es\_US. Multiple host names can be mapped to one locale. If no mapping exists for a host name, the page is delivered in the default site locale.

```
www.example.com/mens
```

```
de.example.com/mens
```

For **URL Parameter**, the presentation language is determined by examining a standard URL parameter of the incoming URL. The default parameter name is "locale", `?locale=en-US`, and the system lets you specify another query string parameter name, such as "lang". Configure a mapping of a language code for any custom string to a site locale, for example default <> en\_US, es <> es\_US. If no mapping exists, it's assumed that the locale ID is specified. If the locale id doesn't match any of the allowed site locales, the page is delivered in the default site locale. Generated URLs contain the same URL parameter as the incoming URL if the prefix was valid, or the prefix defined for the site default locale if the prefix was invalid. Define the name of the URL parameter.

```
www.example.com/mens?locale=en-US
```

```
de.example.com/mens?lang=en
```

```
www.example.com/mens?lang=spanish
```

For **Path**, the presentation language is determined by examining the first element in the URL path. You can configure a mapping of the URL language code to a site locale, for example `default-> en_US`, `en -> en_US`. If no mapping exists, it's assumed that the locale ID is specified in the URL. If the locale id doesn't match any of the allowed site locales, the page is delivered in the default site locale.

```
www.example.com/de/mens
```

```
www.example.com/en/mens 
```

To define a double-path locale, specify the first value, the '/' character, and then the second value. For example, `en/US` or `de/DE`, which results in the following:

```
www.example.com/en/US/mens
```

```
www.example.com/de/DE/mens
```

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/images/icon_note.png)

Note When using a double-path, the locale mapping of the URL Parameter type can't contain '/'. See [Using the SEO URLs Settings Tab](https://help.salesforce.com/s/articleView?id=cc.b2c_using_the_seo_urls_settings_tab.htm&release=264.0.0&type=5 "Use this B2C Commerce tab to configure locale mappings, character replacements, and search refinement settings.").