Create a Redirect from a Salesforce B2C Commerce URL
The URL redirects feature redirects obsolete or unavailable B2C Commerce pages to currently available pages, or to a specific URL outside B2C Commerce.
This feature is not intended for redirects from external platforms. For more information on redirecting URLs from an external platform, see URL Redirects.
- Select site > Merchant Tools > SEO > URL Redirects.
-
Do one or more of the following:
- Click New to create a URL redirect.
- To locate an existing URL redirect, enter a search term and click Find.
-
To perform a more detailed search for an existing URL redirect, click
Advanced.
In the URI Search Term box, enter one or more words that identify the URI you want to redirect. Checking that the URI doesn't already have a redirect prevents you from creating a duplicate redirect.
- To validate that all redirects are configured to redirect to an existing category, product, or content item, click Find Invalid Redirects.
- Click Edit to edit an existing URL redirect.
-
On the Edit URL Redirect page, you can identify the source
URI directly or specify the source type and ID.
We recommend that you source type and ID for two reasons. First, all your redirects stay in place if you switch from standard URLs to search-friendly URLs. Second, because you can select your source IDs directly, there's less chance of a data entry error.
-
Specify the source type; the next field changes based on your
selection.
Option Description URI | URI Enter the URI. Upper case C[0-9]
pattern for source URI is not supported.Category | Category ID Enter the category ID or click the browse button to select one. Product | Product ID Enter the product ID or click the browse button to select one. Folder | Folder ID Enter the folder ID or select one from the list. Content | Content ID Enter the content ID or click the browse button to select one. For URI, remove the hostname and the site ID, as well as any redundant query strings. B2C Commerce automatically selects the new URL that has the most parameters in common with the old URL.
For example, if you want to redirect any products in the women's category:http://www.mystore.com/on/demandware.store/βSites-YourShopHere-Site/βEN_US/Search-Show?_ie=iso-8859-1&cgid=womens
Remove:http://www.mystore.com/on/demandware.store/βSites-YourShopHere-Site
Remove:_ie=iso-8859-1
Enter:
/βEN_US/Search-Show?cgid=womens
You can use an asterisk as a wildcard in the URI. Redirects with wildcards are processed after redirects without wildcards.
See URL Redirect Processing and Examples for more examples and information about wildcards.
- Check the Enabled box.
-
Specify the destination type; the next field changes based on
your selection.
Option Description URL | URL Enter the URL. Category | Category ID Enter the category ID or click the browse button to select one. Product | Product ID Enter the product ID or click the browse button to select one. Folder | Folder ID Enter the folder ID or select one from the list. Content | Content ID Enter the content ID or click the browse button to select one. -
You specify the URL you want to redirect to as an absolute or
relative URL:
- Absolute URL: The URL must begin with a protocol, for
example,
http://www.example.com.
Note: Only the HTTP and HTTPS protocols are supported. Additional parameters must be specified in the Additional Parameters field, not in this field. - Relative URL: Similar to the URLs entered for the URI field, enter only the portion of the URL after the host name and before the query string. Additional parameters must be specified in the Additional Parameters field, not in this field.
- Absolute URL: The URL must begin with a protocol, for
example,
-
You can control if the Source URL parameters are copied to the
Destination URL.
Option Description Default The site preference is used. See Business Manager: site > Merchant Tools > Site Preferences > Storefront URLs. > Copy Source Parameters. No This overrides the site preference. Source URL parameters are not copied to the destination URL. The destination URL parameters are used as specified.
Yes This overrides the site preference.
Parameters from the request are added to the destination URL. For example, when the source URL is
/mens/shoes?affiliate_code=123,
and the destination URL is/gents/shoes,
and the Copy source URL parameters setting is enabled for the redirect, then the actual destination URL is/gents/shoes?affiliate_code=123.
Request parameters can't already be in the destination.
The ID identifier must correspond. For example, if
Product
is configured as source andCategory
is configured as destination, thenpid
andcgid
will not be copied from the original request. The Destination URL parameters are used instead. -
Select whether you want
the redirect to be temporary or permanent.
Option Description Permanent (301) redirects Retains the SEO trust and ranking of the source of the redirect. Although it might take some time for search engines to recognize the redirect, any dip in rank should be quickly reversed. Permanent redirects are never removed. Found/Temporary (302) redirects 302 redirects are used to retain SEO rankings for content that has permanently moved to a new URL. A 302 redirect does not retain the SEO trust and ranking of the source of the redirect. You should expect your SEO ranking for the page to drop until the new page has time to accumulate the same rankings and trust. A 302 redirect is temporary, because it's removed when the new URL has accumulated the same rankings and trust as the original URL. There is no expectation that the old URL will ever be used to access content ever again. For example, 302 redirects are used if you change the name of a category. B2C Commerce caches temporary redirects, but the browser does not. Temporary (307) redirects 07 redirects are used as a truly temporary redirect for a URL that is undergoing maintenance and will shortly be available again. A 307 redirect doesn't retain the SEO trust and ranking of the source of the redirect. You should expect your SEO ranking for the page to drop until the new page has time to accumulate the same rankings and trust. Temporary redirects are intended to be removed. B2C Commerce caches temporary redirects, but the browser does not. Use 307 redirects if the original content is temporarily removed and will be returned to the old URL. For example, if an article or microsite is removed for editing or updating and will shortly be available again. -
For Additional URL Parameters (if you
select a URL destination type): enter parameters you want added to the
end of the URL exactly as you want to see them. For example:
&cgid=womens-accessories-scarves&prefn1=displaySiz
Special characters are encoded before they are appended to the URL. Don't add the?
or&
characters to the beginning of the entry; they are added automatically. - Click Apply.
Infocenter Retirement: On June 30, 2023, the Infocenter was retired, and documentation currently hosted on the Infocenter will be published to Salesforce Help, Commerce Cloud Developer Center, and Salesforce B2C Commerce Developer Documentation Resources. For more information, see the release note.