---
schema_version: "1"
id: e27abb845266e71bc979a666a40f8395c9fb4aadd36711a611ee564b4a9b9ac5
title: Configure SEO URLs for B2C Commerce
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/cc/264-0-0/b2c_configuring_seo_urls.md
canonical_url: https://help.salesforce.com/s/articleView?id=cc.b2c_configuring_seo_urls.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: e64a7016c923f65d05de5ba5d25cfaa4d361731162f125c3727ee57445352110
description: Optimizing site URLs for search engines improves user experience, rankings, linking functionality, and greatly increases site traffic.
products:
  - Commerce
  - B2C Commerce
release: "264"
---
# Configure SEO URLs for B2C Commerce

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](https://help.salesforce.com/s/articleView?id=cc.b2c_configuring_storefront_url_preferences.htm&release=264.0.0&type=5 "Enable your SEO URL rules for a B2C Commerce site.") 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.

1. Turn on SEO URLs via [storefront URL preferences](https://help.salesforce.com/s/articleView?id=cc.b2c_configuring_storefront_url_preferences.htm&release=264.0.0&type=5 "Enable your SEO URL rules for a B2C Commerce site.").
2. Configure hostname aliases for your site.
    
    Otherwise, URLs do not appear correctly in your storefront. See [Hostname Aliases](https://help.salesforce.com/s/articleView?id=cc.b2c_hostname_aliases.htm&release=264.0.0&type=5 "A hostname alias defines alternative names for an existing website URL. You must set up and register the DNS and domain names to use hostnames aliases in a B2C store. A hostname alias can map a human-readable hostname onto a more technical hostname. A hostname alias can also redirect one external, human-readable domain to another, such as www.mystore.com to www.yourstore.com.").
    
    See [Configuring Hostname Aliases](https://help.salesforce.com/s/articleView?id=cc.b2c_configuring_hostname_alias.htm&release=264.0.0&type=5 "A hostname alias is required to create short, meaningful URLs for external search engines to index. Assign at least one hostname alias that is the current hostname on which the B2C Commerce instance is running.").
3. In the URL Rule module (select the [General Tab](https://help.salesforce.com/s/articleView?id=cc.b2c_using_the_seo_url_general_tab.htm&release=264.0.0&type=5 "The B2C Commerce SEO URL General tab provides status information and links to conflict details, letting you handle the conflicts.") at **Merchant Tools** | **Site** | **SEO & Discoverability** | **URL Rules**), 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 ![App Launcher](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/cc/b2c_merchandiser_administrator/images/appLauncher.png), and then navigate to **Site Preferences** | **Storefront URLs** to enable the URL Rules module.
4. Click the **Settings** tab to configure locale-mapping [settings](https://help.salesforce.com/s/articleView?id=cc.b2c_using_the_seo_urls_settings_tab.htm&release=264.0.0&type=5 "Use this B2C Commerce tab to configure locale mappings, character replacements, and search refinement settings.").
    
    You can configure that your locale is determined from your [hostname alias](https://help.salesforce.com/s/articleView?id=cc.b2c_configuring_hostname_alias.htm&release=264.0.0&type=5 "A hostname alias is required to create short, meaningful URLs for external search engines to index. Assign at least one hostname alias that is the current hostname on which the B2C Commerce instance is running."), 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.
5. 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:](https://help.salesforce.com/s/articleView?id=cc.b2c_creating_catalog_content_urls.htm&release=264.0.0&type=5 "Configure how your B2C Commerce SEO URLs are created for category URLs, category search refinement URLs, and product URLs.") for category|folders URLs, category|folder search refinement URLs, and product|content asset URLs
    - [Pipeline URLs:](https://help.salesforce.com/s/articleView?id=cc.b2c_creating_pipeline_urls.htm&release=264.0.0&type=5 "Create up to 500 alias for URLs generated by a B2C Commerce pipeline.") for search-friendly URL mappings for your pipelines
6. Configure URL character replacement [settings](https://help.salesforce.com/s/articleView?id=cc.b2c_using_the_seo_urls_settings_tab.htm&release=264.0.0&type=5 "Use this B2C Commerce tab to configure locale mappings, character replacements, and search refinement 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.
    
    See [URLs: Substituting Reserved and Special Characters](https://help.salesforce.com/s/articleView?id=cc.b2c_urls_substituting_reserved_and_special_characters.htm&release=264.0.0&type=5 "When generating your B2C Commerce storefront URLs, eliminate or substitute certain characters.").
7. Configure how you want search refinements to appear in the URL via search refinement [settings](https://help.salesforce.com/s/articleView?id=cc.b2c_using_the_seo_urls_settings_tab.htm&release=264.0.0&type=5 "Use this B2C Commerce tab to configure locale mappings, character replacements, and search refinement settings.").
8. 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.
    1. 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](https://help.salesforce.com/s/articleView?id=cc.b2c_using_the_seourls_url_archive_tab.htm&release=264.0.0&type=5 "The URL Archive redirects out-dated URL mappings to the current URL mapping (as defined in your category and folder URL rules section) on your B2C Commerce Staging and Production instance. When out-dated redirects, initiated by the archive, become obsolete (for example, because a category was deleted or because of ID changes), remove them from the URL archive tab. Search for the URL path or object ID.") tab, which only appears on the Staging instance, to delete or view these mappings.
    2. 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](https://help.salesforce.com/s/articleView?id=cc.b2c_creating_url_search_refinement_redirects.htm&release=264.0.0&type=5 "Creating URL search refinements in B2C Commerce is a multi-step process. Only add redirects for active URL search refinement.").
        
        The snapshot tool provides information on how your mappings have changed over time, from which you can easily create redirects.
9. Also do the following:
    
    - Override generated SEO URLs
    - Create Home page links