You can configure how your SEO URLs are created for category URLs, category search refinement URLs, and product URLs.
While it is
possible to customize folder URLs, for most sites, folders don't have a
URL in the storefront. Adding a rule syntax for folders can cause global
conflicts with category URLs, because some folders and categories might
use the same name, such as gift certificates
. For this reason, we
recommend not customizing folder URLs unless you have developed landing
pages for folders.
When generating static content files, for example, images, css files, and js files, Salesforce B2C Commerce only changes URLs when the corresponding file changes. This is to improve cache efficiency, resulting in better page render times. Prior to Release 15.4, the URL changed whenever the static content cache of the site was invalidated, even though the actual content file did not changed.
The URL page cache ID uses a file fingerprint pattern:
/dw98c95d91
. Static Image URLs and image URLs in
generated sitemaps also include the file fingerprint pattern, which only
changes if the file content changes.
If your custom logic for generating static content URLs relies on the presence of the cache ID v-number in the URL, you must change your application. The caching time for static content (time-to-live) is 30 days.
See Configuring SEO URLs.
See URL Rules URL Syntax.
You might want to consider the following when creating your rules:
category
rather
than category-path
to keep your URLs brief.womens > shoes and mens >
shoes
, you might want to use category-path
rather than category
so that you don't create
conflicts between category names, such as shoes.category-path,
you might want to
use a delimiter other than a forward slash, so that product names
or IDs don't appear part of the path and are read correctly by the
search engine.This lets you add a value to the category|folder Page URL attribute to override specific endpoints. This is useful for cases where different categories automatically generate identical, conflicting URLs; or if you want to use a different value for the folder than the automatically generated value.
If you do not check this box:
electronics/television-1
and
electronics/television-2
.Storefront URL mappings are generated and stored for online/offline categories and folders based on defined rules on each instance type, except for on a Production instance where they go live only via replication.
Mappings for offline categories/folders are required to
have a corresponding rule-based mapping in place if they are going live. Otherwise, a
non-SEO URL is created as follows: /on/demandware.store/[…].
This
behavior can result in conflicts for hidden categories/folders, which are used to solve
use cases other than to go online on Production.
For example, you want to create temporary offline categories to prepare new product collections, and plan to change the ID/display name after the category is finalized. This setting enables you to avoid the URL generation of all offline categories, and thus avoid the conflict handling that might result in categories with non-SEO-friendly online category URLs. Low-ranked SEOs can result in the loss of traffic. In this type of situation, you should deselect this setting.
This enables you to add search refinement information to the URL path instead of the query string.
Adding a constant is optional. It enables you to easily control search engine crawling for your storefront site, for example:
User-agent: *, Disallow: /constant/*
in the
robots.txt
file.
While there are other ways to control crawling, such as using meta robots, as follows:
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
The constant is a fast and easy way.
You can give the constant a different name for each locale. The constant is added
to the path at the position where it's defined, and only if a refinement
after this constant is also in the path. For example, brand,
constant, color
is defined for when we can get URLs such as the
following:
/aBrand/constant/red - /aBrand/
A defined list of enabled search refinements ensures that categories|folders use the first five valid (defined and not blocked) search refinements, to add corresponding values to the URL path given as a parameter to build a URL.
The following URL is an example:
www.my-host.com/New-Arrivals/?prefn1=brand&prefv1=aBrand&prefn2=refinementColor&prefv2=Blau|Grün
This
could look like the following (configure settings on the General tab > Search
Refinement URL Settings section: After
, /
,
/
, I
):
www.my-host.com/New-Arrivals/aBrand/Blau|Grün
You can
also control the position of how mappings are added to the URL and delimiters. All
configured character replacements clean the URL, and with this the URL could look like
the following (enabled lowercase, character replacement 'ü' -> 'ue') (configure
settings on the General tab > Search Refinement URL Settings section:
Before
, /
, _
, -
):
www.my-host.com/abrand_blau-gruen/new-arrivals
Configure category search refinements in site > Merchant Tools > Products and Catalogs > Catalogs > catalog > Category.
Configure folder search refinements in site > Merchant Tools > Content > Libraries > library > Edit content > Search Refinement Definitions tab.
See URL Rules URL Syntax. You might want to consider the following in creating your rules:
womens > shoes and mens >
shoes
, you might want to use category-path
rather than category
so that you don't create
conflicts between category names, such as shoes.category-path,
use a delimiter other than a forward slash, so that
product|content asset names or IDs don't appear as part of the
path.This enables you to add a value to the product|content asset Page URL attribute to override specific endpoints. This is useful for cases where you want to use a different value for the product than the automatically generated value.
If you don't check this box, there is no way to override URLs for specific products|content asset. You can still customize URLs, however, by including an attribute with a value specific to each product|content asset in the rule itself. For example, you can include the Page URL attribute directly in the rule, instead of as an override.
/product-or-content-name/12345.html
to /product-or-content-name-12345.html
.Best Practice: When using dashes in product IDs (for example,
123-456
) and setting this flag, the combination can result in
inaccessible product pages. This is related to how browsers handle and rewrite
dashes in URLs. The generated product URLs from Salesforce B2C Commerce encode the
dashes ( -
to %2D
), which are included in the
product ID, as expected. However, some browsers decode the dashes again, which
results in an error (URL resulting in 404). Best practice is to avoid dashes in
product ID when using the Use '-' as Product ID Separator Instead of
'/'
setting.
© Copyright 2000-2023, Salesforce, Inc. All rights reserved. Various trademarks held by their respective owners. |
Show URL | Submit Feedback | Privacy Policy |