The decision that matters
Generate the sitemap from the same content source used to build the site. Include canonical, public pages that return successful responses. Exclude private account screens, error routes and duplicate URL variants. Keep modification dates tied to meaningful content changes instead of rewriting every date on each deployment. A sitemap is most useful when it accurately reflects the content available to a visitor.
A practical scenario
A journal with fifty articles can generate its sitemap entries directly from the article data. When an article is added or retired, the inventory changes with it. A manual sitemap copied from an early launch may omit new guides or continue listing removed project pages. A link crawl can catch these differences before deployment.
Before you ship
- Check that every listed URL returns the intended page.
- Exclude redirects and private routes from the canonical inventory.
- Link the sitemap from robots.txt and keep normal navigation crawlable.
A useful next step
Use the sitemap as an input to a deployment verification script. Check status, title and canonical metadata for each entry. Submit or inspect the sitemap in the search platform you operate, while recognizing that discovery, indexing and ranking are separate outcomes.
Primary reference & further reading
This guide combines general engineering recommendations with an illustrative scenario. Provider behavior can change; check current documentation before applying it. Read our editorial approach.