---
schema_version: "1"
id: 065b243713385c9112179575e9b4ab715b3b35645709605d84c1061779847068
title: Characters Allowed in URLs
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/cc/264-0-0/b2c_characters_allowed_in_urls.md
canonical_url: https://help.salesforce.com/s/articleView?id=cc.b2c_characters_allowed_in_urls.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 23a9048d0b82e85f982f5cf2ef72d654be5aa5e29032ede351d924056b77892e
description: Encode most characters used in URLs. B2C Commerce automatically encodes special or reserved characters, or umlauts in URLs, but doesn't remove them.
products:
  - Commerce
  - B2C Commerce
release: "264"
---
# Characters Allowed in URLs

Encode most characters used in URLs. B2C Commerce automatically encodes special or reserved characters, or umlauts in URLs, but doesn't remove them.

![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 These characters are reserved and are removed if used as a standalone URL prefix: "h", "\_h", "n", "\_n". For example, the category URL "/h/womens is changed to /womens.

If you use product or category names to construct your URLs, you can configure whether spaces in names are encoded with '%20' or replaced by another character, such as a hyphen. You can also configure whether all characters are converted to lower case and all URLs have a trailing slash. The characters allowed or disallowed in URLs applies to all B2C Commerce URLs, whether you are using the standard syntax, the search-friendly URL syntax, or the URL Rules URL syntax.

## B2C Commerce URL Encoding of Product or Content IDs

The following characters are allowed in product or content IDs and are handled by search-friendly URL generation.

<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="d73000e48">Character</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d73000e51">Description</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Character" class="slds-cell-wrap" style="vertical-align:top;" headers="d73000e48 ">-</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d73000e51 ">Minus</td>

          </tr>
          <tr class="">
            <td data-label="Character" class="slds-cell-wrap" style="vertical-align:top;" headers="d73000e48 ">.</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d73000e51 ">Period</td>

          </tr>
          <tr class="">
            <td data-label="Character" class="slds-cell-wrap" style="vertical-align:top;" headers="d73000e48 ">,</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d73000e51 ">
              <p>Comma - The comma can generally be used, except for the
                Product-ShowInCategory pipeline that requires two parameters, in which case
                category ID must not contain a comma. </p>
              <div class="slds-box slds-box_x-small slds-theme_shade slds-m-top_medium slds-m-bottom_medium">
                <div class="slds-media slds-media_responsive">
                  <div class="slds-media__figure"><span class="slds-icon_container slds-icon_container_circle slds-icon-note-note"><img style="margin-bottom:0;" src="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" alt="Note"></span></div>
                  <div class="slds-media__body" style="padding-top:.5rem;padding-bottom:.5rem;" id="b2c_characters_allowed_in_urls__note_g3v_zmb_hwb"><a name="b2c_characters_allowed_in_urls__note_g3v_zmb_hwb"><!-- --></a><span class="slds-text-title_caps">Note</span> Salesforce recommends not using commas in object
                    IDs to avoid possible problems with custom pipelines that require
                    multiple parameters.</div>
                </div>
              </div>
            </td>

          </tr>
          <tr class="">
            <td data-label="Character" class="slds-cell-wrap" style="vertical-align:top;" headers="d73000e48 ">_</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d73000e51 ">Underscore</td>

          </tr>
          <tr class="">
            <td data-label="Character" class="slds-cell-wrap" style="vertical-align:top;" headers="d73000e48 ">#</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d73000e51 ">Number sign</td>

          </tr>
          <tr class="">
            <td data-label="Character" class="slds-cell-wrap" style="vertical-align:top;" headers="d73000e48 ">&lt;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d73000e51 ">Less than</td>

          </tr>
          <tr class="">
            <td data-label="Character" class="slds-cell-wrap" style="vertical-align:top;" headers="d73000e48 ">&gt;</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d73000e51 ">More than</td>

          </tr>
          <tr class="">
            <td data-label="Character" class="slds-cell-wrap" style="vertical-align:top;" headers="d73000e48 ">%</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d73000e51 ">Percent</td>

          </tr>
          <tr class="">
            <td data-label="Character" class="slds-cell-wrap" style="vertical-align:top;" headers="d73000e48 ">$</td>

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d73000e51 ">Dollar Sign</td>

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

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d73000e51 ">Colon</td>

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

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d73000e51 ">Semicolon</td>

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

            <td data-label="Description" class="slds-cell-wrap" style="vertical-align:top;" headers="d73000e51 ">Equal sign</td>

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

While it's possible to use other characters in product IDs, we generally recommend using alphanumeric characters in product and content IDs, because they can cause URLS to not be generated correctly.

## B2C Commerce URL Encoding of Marketing Text

Characters Disallowed in SEO URLs:

- `&` \- ampersand
- ASCII control characters (ASCII code: 0x00-0x1F, 0xF7). For example, NULL, tab, or other invisible control characters are not allowed in SEO URLs.

Character Encoding Rules:

B2C Commerce supports UTF-8 and ISO-8859-1 encodings. All other encodings supported by Java virtual machines are expected to work, but are not officially supported. See [URL Syntax](https://help.salesforce.com/s/articleView?id=cc.b2c_url_syntax.htm&release=264.0.0&type=5 "Define how your storefront URLs look in Salesforce B2C Commerce via two types of URL syntax.") for information on specifying ISO or other encodings as part of a URL.

B2C Commerce uses the following rules when encoding text in SEO URLs.

- All visible special ASCII characters except disallowed characters. If a disallowed character is present, it's replaced by a space replacement character ('+' or %20).
- Spaces at the beginning and the end of the marketing text are removed and multiple spaces compressed into one.
- Standard UTF8 URL encoding applies, using a space substitute (%20, +) that you configure.
- Forward slashes (`/`) are not encoded and stay in clear text in generated URLs.
- The plus sign (`+`) is encoded according to the current system configuration for the space substitution character.

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

Example

These examples assume that the URLs use the default configuration and assume all encoded URLs are prefixed by the protocol and host name.

The SEO Definition for all of the following URLs is:

```
${name}/${productID}
```

  
| Name | ID | Encoded URL |
| --- | --- | --- |
| PRODUCTäNAME | ID+ID | PRODUCT%C3%A4NAME/ID%20ID |
| PRODUCT NAME | ID&ID | PRODUCT%20NAME/ID%20ID |
| PRODUCT&NAME | ID?ID | PRODUCT%20NAME/ID%3FID |
| PRODUCT+NAME | ID ID | PRODUCT%20NAME/ID%20ID |
| PRODUCT%NAME | ID/ID | PRODUCT%25NAME/ID/ID |
| PRODUCT/NAME | ID%ID | PRODUCT/NAME/ID%25ID |
| PRODUCT-NAME | ID-ID | PRODUCT-NAME/ID-ID |