URL Redirects

During the initial transition between an existing site and a new Salesforce B2C Commerce site, consider creating 301 redirects from the old site to the new site. Over time, you can create redirects from one page or URL to another.

When to Use the Alias, Mapping Rule, Static Mapping, and URL Redirect Features

Redirecting host-only URLs

You must always configure SEO > Aliases. Hostname aliases generate 301 redirects for host-only URLs. They also let you redirect URLs to locale- or device-specific sites.

Redirecting B2C Commerce URLs

If the redirect from a B2C Commerece URL
  • Use SEO > URL Redirect., which is used for redirects of obsolete pages hosted on B2C Commerce to current pages on B2C Commerce. For example, if you change the name of a category. This is the only feature that can be used to redirect B2C Commerce URLs. See Creating a Redirect from a B2C Commerce URL. For more information about how this feature works, see URL Redirect Processing and Examples.

Redirecting legacy Platform URLs

If the redirect is from a legacy platform different than B2C Commerce, mapping depends on the type of redirect URL.
  • A content page or unique or unusual - in this case you want to use SEO > Static Mapping., which is used for specific pages, whether they are landing pages or searches that don't conform to a general pattern. See Static Mappings.
  • A product or category page or conforms to a pattern - in this case you want to use SEO > Dynamic Mapping. - mapping rules identify the pattern of an incoming URL and map it to a pattern for a B2C Commerce URL. Creating a few mapping rules can let you manage many URLs from a legacy site efficiently.

    Mappings can be maintained in B2C Commerce for as long as you wish. We don't recommend removing them, because it isn't possible to predict when other site owners or search engines update their links, and removing the mappings prematurely causes you to lose traffic. See Dynamic Mapping.

Legacy Platform URL Redirects and Site Rankings

Most merchants migrate from an existing site to B2C Commerce. Usually, the existing site has built up search rankings and links on other sites to their site that drive traffic to the merchant. You can use B2C Commerce to create mappings between old links and new pages so that you don't lose traffic from other sites and search engines. If you don't create these mappings, the old links don't work, and your SEO rankings can be severely impacted.

To create redirects for these links, we have three features: B2C Commerce hostname aliases, B2C Commerce Site URL-Mapping Rules, and Site URL Static Mapping. See Configuring 301 Redirects for Legacy URLs.

Links that become obsolete because you change a category name on B2C Commerce also need permanent redirects so as not to lose customers who have bookmarked products and to retain your rankings.

To create redirects for these links, use the URL redirect feature.

Redirecting from Legacy Sitemap Web Pages

B2C Commerce reserves sitemap*xml as a redirect keyword for XML sitemaps used by search engines to crawl the site. This string can't be used when creating redirects using any of the B2C Commerce URL redirect features. However, if you are redirecting a legacy sitemap page that showed an overview of your old site, you can set up a redirect using the string sitemap or SiteMap. See Sitemap Overview.

Automatic Redirects from Deprecated SEO Support Module to URL Rule Module URLs

If you created your storefront before 13.1 and used the SEO Support module to optimize your URLs, then if you upgrade to the URL Rule module to optimize your URLs, B2C Commerce automatically creates 301 redirects from your old URLs to your new URLs when you enable the URL Rules module.

Error Pages

If a user mistypes a URL or attempts to reach a page that no longer exists, they see a 404 page. You can create custom 404 pages that let them enter the site successfully. See Creating 404 Error Pages with Alternate Paths.

Related Links

Assigning a Hostname Alias

Automatic 301 Redirects

Create a Redirect with Appended Values

X Privacy Update: We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used. By continuing to use this site you are giving us your consent to do this. Privacy Policy.