B2C Commerce's site alias configuration
doesn't allow for external URL redirects. The solution is to build a
custom pipeline that sends the configured hostname to the
redirectpermanent template. This extension shows how to
build such a custom pipeline.
Required Editions
Available in: B2C Commerce
To specify the main deferred hostname, define an attribute called
HTTPhostname that is managed in Business Manager. This
specifies at a site level what the main HTTP and HTTPS hostname is.
Configure HTTP and HTTPS host name in B2C Commerce.
In the Your Shop Here site lookup SEO settings. The default SEO
pattern generates links with the host name. However, to restrict the customer to view the
preferred host name, you must specify the host name here. This forces this host name to
appear the next time the customer clicks a site link.
Create a custom pipeline
RedirectAlias-Start.
Create a Start node.
Create an Assign node.
Add the following value to the
From 0 property:
http:// +
dw.system.Site.current.httpHostName
Create an interaction node with the
current/redirect template from the SiteGenesis application. This is a
redirect permanent template.
Set up the wrong site alias to call
RedirectAlias-Start.
Did this article solve your issue?
Let us know so we can improve!
Loading
Salesforce Help | Article
Cookie Consent Manager
General Information
Required Cookies
Functional Cookies
Advertising Cookies
General Information
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required Cookies
Always Active
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional Cookies
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising Cookies
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.