Improve SEO with a Sitemap

Sitemaps provide search crawlers with instructions on the pages to index and the site hierarchy, which can improve your SEO rankings. Submitting a sitemap to tools such as Google Search Console can also help identify broken links or duplicate content. B2C Commerce includes sitemap management features for:

This guide explains how to create a sitemap for a headless site built on B2C Commerce.

You can use the sitemap feature for headless sites if you built your site on B2C Commerce with any of these storefront implementations:

  • Composable Storefront (PWA Kit) for your whole site
  • A phased headless rollout (SG/SFRA and PWA Kit)
  • Your own bespoke headless implementation

Unless otherwise stated, the steps in this guide apply to all three implementations.

  1. If you haven’t done so already, set up a vanity domain in embedded CDN (eCDN).
  2. In Business Manager (BM), configure a hostname alias for your site that matches your vanity domain.
  3. In BM, generate a sitemap. You can find your sitemap at Replace “” with your vanity domain name.
  4. Update your existing robots.txt file in your PWA Kit or headless site with
  5. If you have a hybrid storefront project (SFRA and PWA Kit) then also:
  6. Notify search engines about your B2C Commerce sitemap.
  • Make sure that your sitemap incorporates all the crucial pages that you want search engines to find and index. This includes product listing pages, product detail pages, blog posts, and other relevant content.
  • If your sitemap becomes very large, consider using priority settings in BM. You can use these settings to indicate which pages are most important for search engines to crawl first. See Generate Sitemaps in B2C Commerce.
  • Schedule a job to update the sitemap regularly so that search engines are aware of these changes and can index them promptly. See Generate Sitemaps in B2C Commerce.
  • Review and update any crawl directives in the robots.txt file to ensure that they align with your SEO strategy and don’t block important parts of the site.
  • Regularly test the accessibility of the sitemap URL to ensure that search engines and users can reach it without any issues.

This section provides suggested solutions for a few common errors that you might encounter while using sitemaps.

Potential Cause: Syntax errors or other errors in your sitemap.

Suggested Solution: Ensure that all URLs in the sitemap are absolute and correctly formatted. Use the correct protocol (http or https) and don’t include session IDs or other dynamic parameters. See Generate Sitemaps in B2C Commerce.

Potential Cause: Inaccurate URLs in your sitemap.

Suggested Solution: Regularly check the URLs in your sitemap to ensure that they’re accessible and don't return errors. Fix any broken links or server issues. See Generate Sitemaps in B2C Commerce.

Potential Cause: Blocking directives errors or other issues in your robots.txt file.

Suggested Solution: Test the robots.txt file by using a robots.txt tester. Ensure that there are no blocking directives that prevent search engines from accessing important pages or the sitemap itself. See Generate a Robots.txt File with Business Manage for B2C Commerce.