Step 3. Configure and enable robots.txt (optional)

Complete the search engine robots configuration with instructions that direct search engines to crawl the parts of your site that you want to be indexed.

Step 4. Submit your site map to search engines

You can submit your site map to different search engines by providing them the link to the sitemap.xml file in your Commerce installation. To copy the link, do the following:

  1. In the Site Map list, right-click the URL in the Link for Google column.

  2. On the menu, choose Copy Link Address.

For more information, see the instructions for the specific search engine. Here are links to instructions for two top search engines:

Step 5: Restore previous robot instructions (optional)

You can now restore either the original (default) restrictions.

Manage sitemaps and robots.txt for multiple websites

If you have multiple websites, you can simplify the process of creating and submitting sitemaps. Simply create one or more sitemaps that include URLs for all your verified stores and save the sitemaps to a single location. All sites must be verified in Google Search Console.

To create sitemaps for a multistore instance, do the following:

  1. Create a folder called sitemaps at the root of your website, then create subfolders for each domain:

    /sitemaps/domain_1/
    /sitemaps/domain_2/
    
  2. On the Admin sidebar, go to Marketing > SEO & Search > Site Map.

  3. Create or edit the sitemap listings for each store and set the Path to the one you created for the store:

    /sitemaps/domain_1/
    /sitemaps/domain_2/

  4. If needed, update your robots.txt file.

    To make sure that the search engine spiders are properly directed to the new sitemaps, you can update or create the robots.txt file. Add the following lines at the top.

      Website Sitemap
      Sitemap: https://www.domain_1.com/sitemaps/domain_1/sitemap.xml
      Sitemap: https://www.domain_2.com/sitemaps/domain_2/sitemap.xml
    
NOTE
If your site uses the Apache web server engine, you should update the .htaccess file in the root of your website to direct any other sitemap requests to the proper place.

Column descriptions

ColumnDescription
IDThe sequential record number of the current site map.
FilenameThe file name of the site map.
PathThe location where the site map resides on the server. For example:
/sitemap/ - Places the site map file in a directory called sitemap, one level below the root of the Commerce installation.
/ - Places the site map file at the base path, or root of the Commerce installation.
Link for GoogleThe URL of the site map that is to be submitted to Google and other search engines.
Last GeneratedIndicates the date and time that the site map was last generated.
Store ViewThe store view where the site map applies.
GenerateRegenerates the site map.

Site map configuration

Your site map should be updated as frequently as the content on your site changes, which could be on a daily, weekly, or monthly basis. The configuration lets you set the frequency and priority for each type of content.

Step 1. Set the frequency and priority of content updates

  1. On the Admin sidebar, go to Stores > Settings > Configuration.

  2. In the left panel, expand Catalog and choose XML Sitemap.

  3. Expand Expansion selector the Categories Options section and do the following:

    NOTE
    If needed, clear the Use system value checkbox to change these settings.
    • Set Frequency to one of the following:

      • Always
      • Hourly
      • Daily
      • Weekly
      • Monthly
      • Yearly
      • Never
    • For Priority, enter a value between 0.0 and 1.0. Zero has the lowest priority.

    XML sitemap - Categories options

    For a detailed list of these options, see Categories Options in the Configuration Reference.

  4. Expand Expansion selector the Products Options section and complete the Frequency and Priority settings as needed.

    For a detailed list of these options, see Products Options in the Configuration Reference.

  5. To determine the extent that images are included in the sitemap, set Add Images into Sitemap to one of the following:

    • None
    • Base Only
    • All

    Catalog configuration - XML sitemap products

  6. Expand Expansion selector the CMS Pages Options section and complete the Frequency and Priority settings as needed.

    Catalog configuration - XML sitemap CMS pages

    For a detailed list of these options, see CMS Pages Options in the Configuration Reference.

  7. Expand Expansion selector the Store Url Options section and complete the Frequency and Priority settings as needed.

    Catalog configuration - XML sitemap store url

    For a detailed list of these options, see Store Url Options in the Configuration Reference.

  8. When complete, click Save Config.

Step 2. Complete the generation settings

  1. Expand Expansion selector the Generation Settings section.

    If needed, clear the Use system value checkbox to change these settings.

    Catalog configuration - XML sitemap generation settings

    For a detailed list of these options, see Generation Settings in the Configuration Reference.

  2. To generate a sitemap, set Enabled to Yes and do the following:

    • Set Start Time to the hour, minute, and second that you want the sitemap to be updated.

    • Set Frequency to one of the following:

      • Daily
      • Weekly
      • Monthly
    • For Error Email Recipient, enter the email address of the person who is to receive notification if an error occurs during a sitemap update.

    • Set Error Email Sender to the store contact who appears as the sender of the error notification.

    • Set Error Email Template to the template used for the error notification.

Step 3. Set the site map file limits

  1. Expand Expansion selector the Sitemap File Limits section.

    Catalog configuration - XML sitemap file limits

    For a detailed list of these options, see Sitemap File Limits in the Configuration Reference.

  2. For Maximum No of URLs per File, enter the maximum number of URLs that can be included in the sitemap.

    By default, the limit is 50,000.

  3. For Maximum File Size, enter the largest size in bytes that is allocated for the sitemap.

    The default size is 10,485,760 bytes.

Step 4. Set the search engine submission settings

  1. Expand Expansion selector the Search Engine Submission Settings section.

    Catalog configuration - XML sitemap search engine submission settings

  2. If using a robots.txt file to provide instructions to search engines that crawl your site, set Enable Submission to Robots.txt to Yes.

  3. When complete, click Save Config.

Previous pageMeta data
Next pageOverview and configuration

Commerce