Salesforce B2C Commerce 19.2 > Merchandising Your Site > Search Engine Optimization > URL Syntax

Characters Allowed in URLs

Salesforce B2C Commerce enables you to encode most characters used in URLs. B2C Commerce automatically encodes special or reserved characters, or umlauts in URLs, but doesn't remove them.

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 should be converted into 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.
Character Description
- Minus
. Period
, 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.
Note: Salesforce recommends not using commas in object IDs to avoid possible problems with custom pipelines that require multiple parameters.
_ Underscore
# Number sign
< Less than
> More than
% Percent
$ Dollar Sign
: Colon
; Semicolon
= Equal sign

While it's possible to use other characters in product IDs, Commerce Cloud generally recommends 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:

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

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

The SEO Definition for all of the following URLs is:
Name ID Encoded URL

Related Links

URL Syntax