Sitemaps (< PagesJS 1.0.0) | Yext Hitchhikers Platform
This is documentation for the beta version of PagesJS (<1.0.0), which is no longer actively maintained.
For up-to-date documentation, refer to the Sitemaps reference doc.
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 the sites-config/sitemap.json
file. 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 according to the rules in sitemap.json
. If you want more information about sitemaps in general, check out this
resource
.
Below is a sample sitemap.json
:
{
"disableSitemapGeneration": false, // Optional field, defaults to false.
"fileName": "custom-sitemap-name.xml", // Optional field.
"exclude_list": [
"feedback/",
"robots.txt"
]
}
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
.
If specifying a custom fileName
for your sitemap, make sure to use the .xml
file suffix.
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.