Sample Extensions to SEO
Check out these sample exentions for SEO.
Home Page Link in Sitemap
The Salesforce B2C Commerce storefront generated map contains a link to the homepage of your store in the following format:
http://<alias>/on/demandware/Sites-<Sitename>-Site/default/Home-Show.
However, if you configure a domain alias for your site that resolves to your home page, using a rule similar to:
"www.mysite.com" : [
{"pipeline":"Home-Show"}
],
Then the generated sitemap contains a link similar to:
http://www.mysite.com/
Customize the Default URL Using the UpdatePageMeta Pipelet
This extension describes how to
remove the product description from the end of the search-friendly URL, by
creating a pipelet that is called before the UpdatePageMetaData pipelet
that changes the inputs that are used for the
pipelet.
UpdatePageMetaData
This is a way to dynamically generate these values, without having to manually input them.
Create External URL Redirects
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.
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
.
Cache Permanent Redirects
The redirectpermanent
template is
not cached in SiteGenesis. If you don't cache it, the requests coming in
go to the application server, which isn't good for the domain. This
extension includes an iscache
in the template, so that
the template is cached.
Retrieve and Store Page Rankings
The simplest way to check that store page rankings is to type in your site name in the search engine you are interested in and then count the sites from the top of the page.
Submit Sitemaps to Yahoo and MSN
In addition to submitting your site map to Google, you can also submit site maps to Yahoo and other search engines.