Automatic 301 Redirects
A 301 redirect is the HTTP status code for a permanent URL redirection that also passes page ranking power to the redirected page. In most instances, a 301 redirect is the best method for implementing redirects in your storefront.
Salesforce B2C Commerce handles requests for URLs that have changed by determining whether the URL is an SEO URL and if the URL matches the expected SEO URL for the product. If the URL has changed, B2C Commerce automatically creates a 301 redirect, which preserves page rankings for products and content, even if their properties change.
Out-Dated Storefront URL Mappings
Out-dated storefront URL mappings are handled as follows:
- Product/Content: if a request with an SEO URL references a product or content that isn't up-to-date because the mapping syntax changed recently (or the URL path was changed manually), the URL automatically redirects to the current product/content URL mapping. This is achieved by using the mandatory product/content ID part in the URL path and works for all instance types.
- Category/Folder/Pipeline: requests that are mismatched regarding the configured trailing-slash are automatically redirected. Out-dated URL redirect mappings are only enabled for Staging and Production instances. See URL Archive.
Search Refinement URLs
To avoid duplicate content, the automatic HTTP 301 redirect handling for search refinement URLs redirects out-dated URL mappings to the current URL mapping, for the following cases:
- URL contains an unmapped and enabled URL search refinement in the
query string, for example,
/shoes/?prefn1=color&prefv1=blue
redirects to/blue/shoes/
. - URL contains multiple URL search refinement mappings with
incorrect order, for example,
/blue/abrand/shoes/
redirects to/abrand/blue/shoes/
. - URL contains multiple URL search refinement values with incorrect
order,for example,
/second-refinement|first-refinement/electronics/
redirects to/first-refinement|second-refinement/electronics/
. - URL doesn't contain a configured constant, for example,
/abrand/blue/shoes/
redirects to/abrand/constant/blue/shoes/
. - URL contains the
Search-Show
pipeline alias but is configured to be excluded, for example,/abrand/blue/search/
redirects to/abrand/blue/
.