Understand XML sitemaps

Commerce auto generates valid XML sitemaps for all of your store pages, or resource types.

This section applies to both OSF and Storefront Classic. This section applies to Open Storefront Framework (OSF) and Storefront Classic.

Commerce resource types include:
  • product
  • category
  • static pages
  • video
  • images
  • supplementary pages: blog/lifestyle section

Determine page visibility settings

These settings will determine whether a URL appears in an XML sitemap:
  • Active

    This option hides a given page from the shopper. If a previously published product is deactivated, you will be prompted to specify its redirect path. If you deactivate a category, you are prompted to provide a direct path and warning displays indicating that you are about to orphan your products. These will then be displayed in a separate folder for you to assign to other active categories

  • Meta robots directive​

    Commerce provides two options: index,follow (default) and noindex,follow. The latter will exclude the page from Google search results, but crawlers will still follow and crawl any links on that page.

  • Canonical tag

    This should be self-referential (default setting), or your custom URL.

  • Exclude from Sitemap

    This allows you to exclude specific pages from being included in XML sitemaps.

Your XML sitemaps should be submitted in Google Search Console and Bing Webmaster tools. If your store’s static image assets are hosted externally/on subdomains then additional hostnames should be verified in Search Console, and XML image sitemaps submitted for those properties. Any possible crawling issues related to images can, therefore, be monitored.

Note that sitemap URLs are generated automatically by Commerce for all of the locales that correspond to a given site.

Work with the image XML sitemap

A separate XML image sitemap file utilizes both required and optional sitemap tags to indicate to search engines which site images are to be crawled and indexed. By default, only key body images, such as, product photos or homepage banners, are included in XML sitemaps. Additional tags are utilized to include the image caption and title.

Images are also included in the default structured data output in JSON-LD. Commerce allows the customization of ALT and TITLE image attributes through editing single images in the Media section, or bulk CSV upload. The default values for product imagery include:
  • ALT → product {displayName}
  • TITLE → product {description} (short)

ALT and TITLE image attributes should be unique and not duplicates of product display names or descriptions. It is recommended that you do not use too many keywords or repeat the same attribute content. All product images should have descriptive file names prior to being uploaded, and dashes should be used to separate words, for example, example-phone-v2-C328.jpg should be used instead of image_8974.jpg.

Note: You should avoid embedding copy into banners as this is illegible to web crawlers. Instead, overlay text on top of imagery as only the ALT and TITLE attributes can be interpreted. Also avoid using CSS background images and instead use standard HTML <img src=””> to add imagery that you want to appear in search results (namely all product photos on both product/collection pages). To add design elements, such as, arrows, bars, small icons, and so on, you can use the CSS background property.

Verify the XML sitemap

You can verify the validity of all your domains and subdomains in a search engine, such as Google Search Console.

Submitting a valid XML sitemap file will influence how quickly your pages are crawled and subsequently indexed. Google's Index Coverage report provides feedback on how quickly new URLs are being processed. Note:You should allow some time for this information to finalize as even though Googlebot may have seen your URLs, it does not mean they will be automatically included in the index.

Sitemap submissions for larger sites enables you to verify the most important directories of the main site as separate properties for easier monitoring. For multi-site store directories, you can verify the language subdirectories as separate properties.