Skip to main content

Explore Search Engine Optimization

Learning Objectives

After completing this unit, you’ll be able to:
  • List five Salesforce B2C Commerce SEO features.
  • Explain the benefits of using hostname aliases.
  • Define three common hostname alias terms.
  • List three tasks you need to accomplish to implement B2C Commerce meta tags.

SEO and B2C Commerce

At Cloud Kicks, a company that specializes in high-end custom sneakers, senior merchandiser Brandon Wilson is all about increasing non-paid search engine results for his company’s storefront.

Brandon Wilson, Cloud Kicks merchandiser

He’s eager to design and implement a fabulous search engine optimization (SEO) strategy to make this happen. When a shopper does a Google search, for example, he wants the right combination of creative and technical elements on the Cloud Kicks site to place that site at the top of the shopper’s search results list.

He has a lot to consider.

For one thing, Google gives a lower search results ranking to sites with super-long URLs and multiple directory layers and parameters. So he already knows what to avoid.

With these B2C Commerce SEO features, Brandon can make a difference.

  • Hostname aliases: Configure all variants of a website’s name to lead to the website.
  • SEO URLs: Shrink the URLs to a searchable and human readable size.
  • XML sitemaps: Tell search engines what’s on the site.
  • SEO meta tags: Describe a page’s content to improve your site SEO ranking.
  • Redirects and mappings: Redirect shoppers to the right place.

B2C Commerce offers multiple ways to improve SEO, including hostname aliases, SEO URLs, XML sitemaps, SEO meta tags, and redirects and mappings.

The following table shows what you need to do to design, configure, deploy, and maintain these features. Note that:

  • Metadata is data (info) about data on an HTML page that doesn’t display but is readable by browsers, search engines, and other web services. The <meta> tag is where you put the metadata—such as the page description and the HTML page’s author—on the HTML page.
  • 301, 302, and 404 are HTTP response status codes.
For... Do this...
  • Create short, meaningful URLs for external search engines to index by assigning a short alias to a long hostname.
  • Define which devices, requests, and languages map to which domain and locale.
  • Identify inbound links on other sites and ask them to update with new URLs.
  • Create custom default URLs, page-specific URLs, and page meta tags (optional).
  • Remove duplicate content from your site. For example, remove two URLs for the same page content.
  • Use the Business Manager URL Rules module to change the URLs for your site and add information that can improve your search rank.
XML Sitemaps
  • Register your site and submit sitemaps to external search engines, such as Google.
  • Use Business Manager to create sitemaps for external search engines to improve the freshness and completeness of data that search engines index.
Redirects and Mappings
  • Create permanent 301 redirects for obsolete B2C Commerce URLs to new B2C Commerce URLs.
  • Design storefront-specific 404 error pages containing alternative paths into the site or product catalogs if shoppers browse to outdated URLs.
  • Use static mapping or dynamic mapping rules to map legacy URLs.
  • Create temporary 302 redirects for out-of-stock merchandising scenarios.
  • Configure 301 HTTP redirects from legacy URLs.
Meta Tags
  • Design your meta tags.
  • Create body text, intra-site links, anchor text, and image <alt> tags.
  • Use Business Manager to create and manage page meta tags for your storefront product and content details and list pages.
  • Use Business Manager to add titles, descriptions, and open graph attributes for new categories and products.
  • Use an external tool to build a robots.txt file to exclude portions of your site from indexing. Add a robots.txt file to control portions of the site you don't want search engines to index.
  • Validate HTML code to ensure that there are no errors that prevent spiders from indexing the site.

Brandon takes a closer look at these features to help Cloud Kicks shoppers land exactly where they are supposed to.

In this module, we follow along as he explores hostname aliases: what they are, how they help, and how to configure and use them.

Hostname Aliases

You can use B2C Commerce to create hostname aliases that get shoppers where they need to be via a storefront’s URLs. Aliases generate 301 redirects for host-only URLs and let you redirect URLs to locale- or device-specific sites. You can use them to redirect to other aliases, too.

The hostname alias file defines what hostnames/domains B2C Commerce supports. It also defines what pipelines or controllers are triggered (automatically run) for a specific URL.

Controllers are server-side scripts that process the data (and actions) entered into the storefront. They manage the flow of control in the storefront application. Pipelines predate controllers and provide similar functionality. Brandon works with Vijay Lahiri, a developer, to figure out which pipeline or controller to use. Later he'll work with Vijay on some other tasks as well.

Host-only URLs can open specific pipelines. For example, can open the Home-Show pipeline. In the B2C Commerce world, it’s important to configure hostname aliases, even for the basic storefront URL.

Use this terminology when configuring hostname aliases.

Element Description
Entered URL
The URL entered by the shopper.
Host Name
The part of the URL that indicates the host name, for example:
Site path
An optional slash-delimited URL segment that’s appended to the host name. B2C Commerce uses it to differentiate between multiple sites with the same hostname.
Take this hostname, for example:
  • The site path uk is for a site in the United Kingdom:
  • The site path us is for a site in the United States:
A site path can include multiple slashes and can be anything you want (one/two/three/N).
An optional locale identifier you can specify in mapping rules. (We get to mapping rules in a later unit.)
B2C Commerce uses a locale configured in a mapping rule if the hostname (or the hostname plus the site path) matches the beginning part of the entered URL. For each entered URL, B2C Commerce determines the correct locale from the hostname alias files. If there’s no corresponding mapping rule, it falls back to the site’s default locale.
The part of a URL that indicates the path to the page. The path is logically appended to the locale (if there is one), to the site path (if there is one), or to the host name.
For example, /womens/accessories/promopage.html is appended to, to make


Brandon explores ways he can use this technology.

He wants to... Here's an example.
Configure a single domain for multiple sites. site 1, locale A is, site 2, locale A is, and site 2, locale B is
Implement a new site name, but keep the old domains active, even when the old sites are shut down, so Cloud Kicks can get its traffic., , or
Automatically handle common site name misspellings. amerzon instead of amazon or and
Associate an alias with a locale. triggers the de_DE locale.
Associate an alias with a locale-specific landing page. automatically navigates to the Shoes category page.
Associate an alias with device-specific pages. for mobile devices such as smartphones.


Best practice is to use responsive design to handle device-specific pages.

Next Steps

In this unit, you explored how the B2C Commerce SEO features can help external search engines find your storefront. You learned common terms to use to configure hostname aliases, and potential ways to use this technology. Next, you learn how to configure hostname aliases.

Keep learning for
Sign up for an account to continue.
What’s in it for you?
  • Get personalized recommendations for your career goals
  • Practice your skills with hands-on challenges and quizzes
  • Track and share your progress with employers
  • Connect to mentorship and career opportunities