The Pages system automatically generates a sitemap on your behalf based on the contents of your deploy. Sitemaps are generated for every deploy and nightly to ensure all paths are up-to-date. They are automatically submitted to Google Search Console to ensure your pages are crawled and indexed.
Configuration for your sitemap can be set in config.yaml, under the sitemap block. If you want more general information about sitemaps, refer to this Google resource.
Configuration
Below is a sample config.yaml sitemap block:
# The sitemap configuration allows for customization or disabling of automated sitemap generation.
sitemap:
excludeList:
- exclude-at-this-path/*
# disableSitemapGeneration: true
# fileName: custom-sitemap
-
excludeList: An array that specifies paths to exclude from the sitemap. Each item represents a path or pattern. In the example,exclude-at-this-path/*indicates that any pages under that path should be excluded. -
disableSitemapGeneration: When enabled and set totrue, completely disables automated sitemap generation. (Commented out by default.) -
fileName: Allows you to specify a custom file name for the generated sitemap. If set, the sitemap will be namedcustom-sitemap.xmlinstead ofsitemap.xml. (Commented out by default.)
Defaults and Behavior
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.
Note: If specifying a custom
fileNamefor your sitemap, make sure to use the.xmlfile suffix.
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 — for example,
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 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 right away, check back in a few minutes.