Generate Sitemaps in B2C Commerce
Sitemaps are a standardized way to tell search engines about pages on your site that they could otherwise miss during their normal crawling process.
Required Editions
| Available in: B2C Commerce |
In Business Manager, you can configure sitemaps that contain URLs for products, categories, content, folders, pipelines, product images, and custom sitemaps.
For these assets, you can configure if this content is:
- Included in a joint sitemap.
- Included in a separate sitemap.
- Not included in a sitemap.
The sitemap creation process checks whether each URL asset can be added to the generated sitemap. A URL asset is added to the sitemap if the following conditions are met:
- URL is included with the sitemap via sitemap settings.
- The specific URL asset is online.
- Products: The specific URL has the flag sitemapIncluded == YES or it's assigned to a
category that has the flag sitemapIncluded = YES (or its parents).
- You can choose to include or exclude specific folders from the sitemaps using the sitemapIncluded attribute.
- Content Asset: The specific URL has the flag sitemapIncluded == YES (no fallback
from content asset to folder exists).
- You can choose to include or exclude specific folders from the sitemaps using the sitemapIncluded attribute.
-
Click App Launcher
, and then select Merchant Tools | Site | SEO | Sitemaps.
-
On the Sitemaps page, Files tab (default), a list of sitemap files appear with
creation date and time. This list includes sitemap index files and custom
sitemaps.
An existing sitemap is preserved until a new sitemap is successfully generated in the background.
Sitemap files include URLs for each asset for all allowed site locales. Links for all allowed site locales are included as a sitemap entry, and for each entry, all allowed locales are listed as alternate links (if enabled).
-
Select the Host to view the sitemaps by host.
If no hosts are available, you must configure them in the hostname alias file.
-
Click Download to download all sitemap files, based on
host selection.
Sitemap files are linked to the storefront location.
-
Select the Host to view the sitemaps by host.
-
Click the Custom Sitemaps tab.
A list of custom sitemap files appears.
Note Custom Sitemaps are not meant to override, and will not override, the system-generated sitemaps. They’re intended to add additional URLs to sitemap.The Custom Sitemap system will:- create a sitemap_index.xml with a link to sitemap_0.xml
- create the HomeURLs for the site and put them in sitemap_0.xml
-
Select the host.
Only valid sitemap XML files can be used as sitemap files.
-
Click Download to download all custom sitemap
files.
Only the files from the last run are available.
-
Click Upload to upload one or more custom sitemap
files.
Select XML text or all files.
- Click the download icon beside a custom sitemap file to download it.
-
Click the Settings tab, and configure
sitemaps based on asset type: products, categories, content, folder,
pipelines, product images, and custom sitemaps.
-
In the Includes and Updates section, specify what asset types
are included in the sitemap.
- Sitemap Included: Select if you want the asset type to be included in a joint sitemap file.
- Separated Sitemap File: Select if you want a separate xml file created for this asset type.
- Change Frequency: Select always (default), or from hourly to never. This indicates to search engines how frequently the page might change, and not how often the search engine crawls the page.
- Priority: Select the priority used by search engines to determine which pages to crawl first. One (1) has the highest priority.
-
In the Configuration section, specify:
- Links per sitemap file: enter the number of allowed
links per sitemap (0 to 50,000). When a file, such as
sitemap_1.xml, reaches this number of links, an additional file is created, such assitemap_2.xml. If your site has 25,000 links and you set this to5,000, five sitemap files are produced. If you set it to25,000, only one file is produced. - Image View Type: Select the view type of the images to be included. Each catalog has its own view types. View types are configured on the Image Settings tab at Merchant Tools | Site | Products and Catalogs | Catalogs | catalog . Including the view type adds the image location, title, and alternative text for the image to the sitemap.
- Include Products: Specify if you want to include available products only, available and orderable products only, or all products. You can also choose to include or exclude non-searchable products. By default, products must be online, available, and searchable to be included in a sitemap. Extra not-available or non-searchable products can be included by merchants.
- Links per sitemap file: enter the number of allowed
links per sitemap (0 to 50,000). When a file, such as
-
In the Alternate URLs section:
- Include alternate URLs (hreflang): Select if you want to include locale-based URLs. Enter the ISO code for the default locale.
- Include alternate mobile URLs: Select if you want to include URLs for mobile devices. Enter the mobile screen width, for example, 640.
-
In the Included Locales section, you can select the locales
for which URLs are created in Business Manager.
All active site locales are listed.
-
In the Includes and Updates section, specify what asset types
are included in the sitemap.
-
Click the Hostnames tab.
A list of all valid host names, read from the URL rules module and alias file, appears on this page. You can enter the mobile version of the host name. This is the default hostname used for the URL generation in the sitemap.
Note The Host and the Mobile Host can’t use the same mappings.If you don't specify a hostname, Google returns a 404 error when you submit your sitemap. If you haven’t specified a host domain, an IP address is included in URLs to the sitemaps in yoursitemap_index.xmlfile.If no hosts are available on this page, you must configure them in the hostname alias file.
-
Click the Job tab.
The log file that is created contains information about the sitemap, such as number of products, images, categories, folders, and content assets that were assigned, skipped, and added. It also contains detailed information about errors that occurred during sitemap creation, enabling you to better diagnose problems.
All date and time inputs are in the site's time zone.
-
Click Run Now to run the job immediately.
We recommend this approach for sites with infrequent updates or for updates after major site changes where many page URLs have changed. After you run the job, view the progress of the job in the Logs section.Sitemaps appear in the Logs section. Click Refresh to refresh the page.
-
View errors in the logs section.
In this section, you can see the name of the product, category, content, pipeline, or folder that caused an error. The exception to any error is logged to the error log. The sitemap creation job is marked as
Error. -
Schedule automatic sitemap generation by enabling and
configuring the scheduler.
Salesforce recommends this approach for sites with daily or more frequent updates to their pages.
-
In the Schedule section, configure the start date for the
sitemap generation job (date and time); the frequency (minutes,
hours, days, weeks, months, years), and the days.
Salesforce recommends that you schedule this job for low traffic times, such as the early morning, to avoid unnecessary CPU demands and memory consumption.
- Click Apply to save your changes to the schedule.
-
Click Run Now to run the job immediately.

