Sitemaps | Yext Hitchhikers Platform

The Pages system automatically generates a sitemap on your behalf based on the contents of your deploy. Configuration for your sitemap can be set in config.yaml, under the sitemap block. Sitemaps are generated for every deploy and nightly to ensure all paths are up-to-date.

This file contains configuration for how Pages will generate your sitemap. Sitemaps help search engines crawl your site, and the Pages system will automatically create a well-formed sitemap. If you want more information about sitemaps in general, check out this resource .

Below is a sample sitemap.json:

# The sitemap configuration allows for customization or disabling of automated sitemap generation.
sitemap:
  excludeList:
    - exclude-at-this-path/*
#	disableSitemapGeneration: true
#	fileName: custom-sitemap
  • excludeList: This is an array that specifies paths which should be excluded from the sitemap. Each item in the list represents a path or pattern that defines which pages or routes should not be included in the sitemap. In the example provided:
    • exclude-at-this-path/*: This pattern indicates that any pages under the path exclude-at-this-path/ should be excluded from the sitemap.
  • disableSitemapGeneration: This commented-out line suggests an optional configuration. When enabled and set to true, it completely disables the automated generation of the sitemap.
  • fileName: Similar to the previous entry, this is also commented out in the provided example. This option allows you to specify a custom file name for the generated sitemap. If set, it would instruct the system to name the sitemap file as custom-sitemap.xml instead of sitemap.xml.

If fileName is not included, the sitemap will be called sitemap.xml. The sitemap will be served at the root of your site, i.e. yourdomain.com/sitemap.xml.

book
Note
If specifying a custom fileName for your sitemap, make sure to use the .xml file suffix.
book
Note
Sitemaps have a maximum limit of 50,000 URLs. If a site has more than 50,000 URLs, chunk files will be generated that are referenced by the root sitemap file. These too will use the configured name - in the above example, these would be generated as custom-sitemap-name.0.xml, custom-sitemap-name.1.xml, custom-sitemap-name.2.xml, etc.

Each deploy has its own fully independent sitemap that can be previewed. Sitemaps are automatically submitted to Google Search Console to ensure your pages are crawled and indexed.

Sitemaps are generated asynchronously, so there may be a slight delay between deploy and when the sitemaps appear as live URLs. This delay will normally be very small - on the order of seconds - but if you do not see your sitemap appear as a live URL right away, check back in a few minutes to ensure the updated version has appeared.

Feedback