---
schema_version: "1"
id: c5426a34fd9445edbc4285ab010f198d3f7397e1aa61e806f1a9ff6ca6759a6b
title: Generate Sitemaps in B2C Commerce
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/cc/264-0-0/b2c_generating_sitemaps.md
canonical_url: https://help.salesforce.com/s/articleView?id=cc.b2c_generating_sitemaps.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 4d9262c3938f4cf41491733910b018f3709e2c20dcb05882a7f9f0cb987c0e0a
description: Sitemaps are a standardized way to tell search engines about pages on your site that they can otherwise miss during their normal crawling process.
products:
  - Commerce
  - B2C Commerce
release: "264"
---
# Generate Sitemaps in B2C Commerce

Sitemaps are a standardized way to tell search engines about pages on your site that they can otherwise miss during their normal crawling process.

In Business Manager, you can configure sitemaps that contain URLs for products, categories, content assets, folders, pipelines, product images, stores, and custom sitemaps.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/images/icon_note.png)

Note If you don't see Stores on the Sitemaps Settings tab, contact Salesforce Support.

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.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/images/icon_note.png)

Note

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. This condition doesn't apply to stores.
- For products, the product is assigned to the site catalog, and the specific URL has the flag sitemapIncluded == YES or it's assigned to a category that has the flag sitemapIncluded = YES (or its parents). Products that aren't assigned to the site catalog aren't included in the sitemap, even if the sitemap job includes all products and non-searchable products. Choose to include or exclude specific folders from the sitemaps using the sitemapIncluded attribute.
- For content assets, the specific URL has the flag sitemapIncluded == YES (no fallback from content asset to folder exists). Choose to include or exclude specific folders from the sitemaps using the sitemapIncluded attribute.
- For stores, the store has store locator enabled. Store locator stays enabled unless you set `store-locator-enabled-flag` to `false` in the `stores.xml` import/export file. You can't change this flag in Business Manager.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/images/icon_note.png)

Note Product image and video sitemaps have their own schema.

![Important](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/images/icon_important.png)

Important Before generating a sitemap, make sure that the sitemap attributes in those data types have the appropriate values. See [Setting Sitemap Attributes](https://help.salesforce.com/s/articleView?id=cc.b2c_setting_sitemap_attributes.htm&release=264.0.0&type=5 "B2C Commerce generates a sitemap that is compatible with the Sitemap Protocol 0.9 from Sitemaps.Org. Import sitemap attributes through a feed or add them manually in Business Manager. This page describes how to set them manually in the sitemap functionality. If the new sitemap feature is enabled on your instance, you can configure sitemap in the Sitemaps module.") and [Creating Feeds for Sitemap Attributes.](https://help.salesforce.com/s/articleView?id=cc.b2c_creating_feeds_for_sitemap_attributes.htm&release=264.0.0&type=5 "Populate sitemap attribute values through the catalog and content import feeds, which let you set values for sitemap attributes of products and content respectively. You can also use a custom import pipeline to create and populate the attributes.")

1. Click App Launcher ![App Launcher](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/cc/b2c_merchandiser_administrator/images/appLauncher.png), and then select **Merchant Tools** | **Site** | **SEO** | **Sitemaps**.
2. 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).
    
    1. Select the Host to view the sitemaps by host.
        
        If no hosts are available, configure them in the hostname [alias](https://help.salesforce.com/s/articleView?id=cc.b2c_configuring_hostname_alias.htm&release=264.0.0&type=5 "A hostname alias is required to create short, meaningful URLs for external search engines to index. Assign at least one hostname alias that is the current hostname on which the B2C Commerce instance is running.") file.
    2. Click **Download** to download all sitemap files, based on host selection.
        
        Sitemap files are linked to the storefront location.
3. Click the **Custom Sitemaps** tab.
    
    A list of custom sitemap files appears.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/images/icon_note.png)
    
    Note Custom Sitemaps are not meant to override, and do not override, the system-generated sitemaps. They’re intended to add additional URLs to sitemap.
    
    The Custom Sitemap system:
    
    - 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
    
    1. Select the host.
        
        Only valid sitemap XML files can be used as sitemap files.
    2. Click **Download** to download all custom sitemap files.
        
        Only the files from the last run are available.
    3. Click **Upload** to upload one or more custom sitemap files.
        
        Select XML text or all files.
    4. Click the download icon beside a custom sitemap file to download it.
4. Click the **Settings** tab, and configure sitemaps based on asset type: products, categories, content assets, folder, pipelines, product images, stores, and custom sitemaps.
    1. 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 can 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.
    2. 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 as `sitemap_2.xml`. If your site has 25,000 links and you set this to `5,000`, five sitemap files are produced. If you set it to `25,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 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, only online, available, and searchable products appear in a sitemap. Extra not-available or non-searchable products can be included by merchants.
    3. In the Alternate URLs section:
        
        - Include alternate URLs (hreflang): Select 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.
    4. In the Included Locales section, select the locales for which URLs are created in Business Manager.
        
        All active site locales are listed.
5. Click the **Hostnames** tab.
    
    A list of all valid host names, read from the URL rules module and alias file, appears on this page. Enter the mobile version of the host name. This is the default hostname used for the URL generation in the sitemap.
    
    ![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-cc-b2c_merchandiser_administrator-264-0-0-production-enus/ea76f372-6cfa-42a6-8e7c-05c6df7abed8/images/icon_note.png)
    
    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 your `sitemap_index.xml` file.
    
    If no hosts are available on this page, you must configure them in the hostname [alias](https://help.salesforce.com/s/articleView?id=cc.b2c_configuring_hostname_alias.htm&release=264.0.0&type=5 "A hostname alias is required to create short, meaningful URLs for external search engines to index. Assign at least one hostname alias that is the current hostname on which the B2C Commerce instance is running.") file.
6. 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.
    
    1. 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.
    2. View errors in the logs section.
        
        In this section, 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`.
    3. To schedule automatic sitemap generation, enable and configure the scheduler.
        
        Salesforce recommends this approach for sites with daily or more frequent updates to their pages.
    4. 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.
    5. Click **Apply** to save your changes to the schedule.

#### See Also

- [Site Import/Export in B2C Commerce](https://help.salesforce.com/s/articleView?id=cc.b2c_site_import_export.htm&release=264.0.0&type=5 "The site.xsd schema file describes the structure of data that is exported from an instance to a zip file, or imported from a .zip file. The site.xsd file describes all site-related data and global, non-site-related data (that is, organization-level data, such as shipping methods).")