Loading
Feature Disruption - Service Cloud VoiceRead More
Feature degradation | Gmail Email delivery failureRead More
Get Started with B2C Commerce
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Create Catalog and Content URLs

          Create Catalog and Content URLs

          Configure how your SEO URLs are created for category URLs, category search refinement URLs, and product URLs.

          Required Editions

          Available in: B2C Commerce

          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 can 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, change your application. The caching time for static content (time-to-live) is 30 days.

          See Configuring SEO URLs.

          1. Click App Launcher App Launcher, and then select Merchant Tools | Site | SEO & Discoverability | URL Rules.
            If you see the Search Support Preferences page instead of the URL Rules page General tab, navigate to Site Preferences | Storefront URLs to enable the module.
          2. On the URL Rules page, click the Catalog|Content URLs tab.
          3. In the Category|Folder URL Rule field, enter the syntax for your URLs.

            See URL Rules URL Syntax.

            Consider the following when creating your rules:

            • If your site has a category depth greater than two or three categories, you might want to use category rather than category-path to keep your URLs brief.
            • If your site has duplicate category names within different parent categories, such as 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.
            • If you use category-path, 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.
          4. Select the Enable override with pageURL category|folder attribute (if set) (recommended).

            Use this to 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 to use a different value for the folder than the automatically generated value.

            If you do not check this box:

            • To fix the conflict between identical URLs, assign an integer to the end of the URLs arbitrarily. For example, electronics/television-1 and electronics/television-2.
            • There is no way to override URLs for specific products. To customize URLs, include an attribute with a value specific to each product in the rule itself. For example, Include the Page URL attribute directly in the rule, instead of as an override.
          5. Select Append trailing slash to category|folder URLs (recommended).
            This automatically adds a trailing slash to all URLs and prevents search engines from seeing URLs with and without the slash as duplicate content and lowering your ranking.
          6. Select Generate URL mappings for offline categories|folders to generate URLs for all offline categories/folders.
            Deselect to avoid the URL generation of offline categories|folders.

            Storefront URL mappings generate and store 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 can 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, deselect this setting.

          7. Select Enable Category|Folder Search Refinement URLs to configure URLs for search results pages with refinements that are SEO-friendly.

            Use this to add search refinement information to the URL path instead of the query string.

          8. Click Validate, and Save when completed.
          9. Edit your Catalog Refinements.
            1. Click Edit Refinements.
            2. Select the Locale.
            3. In the New Search Refinement field, select the search refinement.
              The list shows all known enabled search refinements. The refinement ID is read only.
            4. Click Create Constant to add a constant. (Optional)

              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.

              Note
              Note

              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.

              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/

            5. Click Apply.
            Valid category|folder search refinements appear with a value count.

            A defined list of enabled search refinements makes sure 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 can 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 can 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 Merchant Tools | Site | Products and Catalogs | Catalogs | catalog | Category.

            Configure folder search refinements in Merchant Tools | Site | Content | Libraries | library | Edit content | Search Refinement Definitions tab.

            Note
            Note The SiteGenesis application doesn't include folder refinement definitions.
          10. In the Product|Content URL Rule field, enter the syntax for your URLs.

            See URL Rules URL Syntax. You might want to consider the following in creating your rules:

            • There is no need to add the product}content asset ID to the rule, because the ID is required and always added automatically.
            • If your site has duplicate category names within different parent categories, such as 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.
            • If you use 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.
          11. Select Enable override with pageURL product|content attribute (if set) (recommended).

            Use this 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. To customize URLs, include an attribute with a value specific to each product|content asset in the rule itself. For example, include the Page URL attribute directly in the rule, instead of as an override.

          12. Select Use '-' as Product|Content ID Separator Instead of '/' (recommended).
            This uses a dash to separate your Product or Content IDs in place of a forward slash. For example, URLs change from/product-or-content-name/12345.html to /product-or-content-name-12345.html.

            Best Practice: When enabling the Use - as Product|Content ID Separator instead of %2D setting, avoid using dashes in both Product IDs and Content IDs to prevent URL resolution failures. While this setting successfully streamlines URLs, it creates a functional conflict if the IDs themselves contain dashes, for example, id-123. Although B2C Commerce encodes these internal dashes as %2D, many browsers automatically decode them back into literal dashes upon loading the page. This causes the system to misinterpret the URL structure, leading to broken links and 404 errors. To make sure site stability and page accessibility are maintained, use alphanumeric characters without dashes for all Product and Content IDs when using the dash separator configuration.

          13. In the Rule Preview section, preview SEO URLs.
            1. Select a category in the Category/Product/Locale field.
              A popup appears instead of a dropdown for storefront catalogs with more than 1000 categories.
            2. Click the browse button to select a product.
            3. Select the language, for example, Default, French, or English).
            4. Select the encoding (Text Encoded or URL Encoded).
            5. Click Preview.
              The results appear beneath the Rule Preview section entry fields.
          14. When your URLs look correct, click Validate at the bottom of the page to detect any conflicts caused by identical URLs.
            The validation section opens. If there are conflicts, click the conflict value to view conflict details.
          15. Click the Catalog|Content URLs and Global Conflicts sections to expand them.
            To resolve conflicts, B2C Commerce automatically adds an integer at the end of the endpoint. If this is acceptable, leave your syntax unchanged. Otherwise, either change your syntax or use the Page URL field to override one endpoint out of each identical pair.
          16. Click one of the following buttons:
            • Cancel (manually resolve conflicts): If you want to change your rule syntax to resolve your conflicts.
            • Save (auto-resolve conflicts): If you want to use the automatic resolution provided by B2C Commerce or use the Page URL field to resolve the conflict.
          17. Select the General tab, and clickRun Update Now.
            The URL Generation Status section shows a report of when the URL generation job was last run and any conflicts detected between different URLs. The conflicts show when duplicate URLs are being generated.
           
          Loading
          Salesforce Help | Article