If your host is listed as an alias, and only one locale is used for the site, you can create links to the home page that are search-friendly because they don't require additional information to determine the locale. In this case, you can use a hostname-only URL instead of generating links to the homepage via a B2C Commerce pipeline. If you have a multi-locale site, ignore the rest of this topic.
-
Directly reference the host name in a link, such as
<a href="http://${request.httpHost}/">home</a>. - Review code that is taken from the SiteGenesis application and new custom code. This step is necessary because SiteGenesis is based on a multi-locale site and uses pipeline to generate home page links.
-
Check that the home page link generates via the pipeline Home-Show in these
SiteGenesis templates:
components/header/header.isml,components/breadcrumbs.isml,components/contentbreadcrumbs.isml,components/productbreadcrumbs.isml, andsearch/components/productsearchbreadcrumbs.isml.
When these templates are used in a custom application, the code must be modified to deliver the hostname-only URL. Hostname-only requests can be issued with or without one or more parameters, with corresponding default destinations.
| Hostname only | Default destination | Example |
|---|---|---|
| Without parameters | Default-Start |
www.my-host.com/
|
| With one or more parameters | RedirectURL-Start |
www.my-host.com/?param=aValue, enabling you to use the
mapping rules functionality.
|
The configuration value apply-to-host-only-request-with-params enables
you to forward hostname requests with parameters to the configured pipeline. For
example: