Use the SiteMap Pipeline and SendGoogleSiteMap Pipelet

The Reference Application contains the pipeline SiteMap which uses the pipelet SendGoogleSiteMap. This exposes the sitemap_index.xml file to any crawler that requests it. For example, when Google requests the sitemap, based on where you indicated it was located when you registered it, the pipeline intercepts the request and returns the sitemap you have placed in the correct place in your cartridge.

For example, if you have registered your sitemap at

http://localhost/on/demandware.store/Sites-YourShopHere-Site/default/SiteMap-Google

or

http://localhost/sitemap_index.html

then the pipeline intercepts requests to these URLs and returns the sitemap in the output stream.

The SiteMap pipeline is contained in the storefront cartridge. Your application must also contain this pipeline to similarly expose your sitemap_index.xml file to search engines.

You must set your current domain under SEO > Aliases to use the SendGoogleSiteMap pipelet.

Related Links

Assigning a Hostname Alias