Optimizing site URLs for search engines improves user experience, rankings, linking functionality, and greatly increases site traffic.
If you are 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.
The maximum length of a storefront URL is 1800 characters. URLs that exceed this limit are shortened, but are still valid and unique. In particular, product and content URLs still contain the product or content ID.
The maximum number of configurable enabled URL search refinements is 30. The maximum number of enabled URL search refinements for a category/folder is 5.
To provide a different order of refinements in different locales, you can enable URL search refinements for specific locales. To prevent search engines from crawling certain URL search refinements, configure a locale specific constant to be added to the URL path. This constant can be used in a robot file to prevent further crawling.
- Turn on SEO URLs via storefront URL preferences.
-
Configure hostname aliases for your site.
Otherwise, URLs do not appear correctly in your storefront. See Hostname Aliases.
-
In the URL Rule module (select the General Tab at ), you can view status and get information that enables you to handle
conflicts.
If you see the Search Support Preferences page instead of the URL Rules page General tab, click App Launcher
, and then navigate to to enable the URL Rules module. -
Click the Settings tab to configure locale-mapping settings.
You can configure that your locale is determined from your hostname alias, URL path, or URL parameter.
Alternatively, you can configure your locale within your hostname aliases configuration by using the locale and if-site-path syntax.
-
Configure how your SEO URLs are created using your catalog or library. Define the
rules on how the URL is created and how enabled search refinements are mapped into
your URL path instead of to parameters. Click the respective tab to configure the
following:
- Catalog|Content URLs: for category|folders URLs, category|folder search refinement URLs, and product|content asset URLs
- Pipeline URLs: for search-friendly URL mappings for your pipelines
-
Configure URL character replacement settings.
Configure character replacements for case (lower case), white space, and custom replacements apply to your category, folder, and enabled search refinement URL mappings.
The part that is rule-based, created for your product and content URLs, is cleaned. The mandatory ID part of this URL is untouched.
- Configure how you want search refinements to appear in the URL via search refinement settings.
-
When storefront URLs are enabled on your Production instance, it is typical that
some of your URL mappings change. In this case, you want a redirect from the old
mapping to the new mapping to enable customers or search engines to see the expected
page.
-
The URL archive functionality is responsible for automatically redirecting
outdated category, folder, and pipeline URL mappings.
This feature is enabled on your Staging and Production instances, where it automatically saves category, folder, and pipeline URL mappings when they become outdated, and can redirect them to new mappings.
If you have an unwanted mapping in your archive, click the URL Archive tab, which only appears on the Staging instance, to delete or view these mappings.
-
The URL Search refinement redirects functionality is responsible for
redirecting outdated search refinement URL mappings. Click the URL
Search Refinements tab to create search refinement
redirects.
The snapshot tool provides information on how your mappings have changed over time, from which you can easily create redirects.
-
The URL archive functionality is responsible for automatically redirecting
outdated category, folder, and pipeline URL mappings.
-
Also do the following:
- Override generated SEO URLs
- Create Home page links