
A sitemap is not a dump of every URL your server can return.
It is a maintained set of preferred public locations. The difficult work is choosing that set. Turning it into XML is the easy part.
Start from canonical intent
Google recommends including the canonical URLs you want to see in search results. Use complete absolute URLs, including the chosen protocol and host. See Google’s build-a-sitemap guidance.
For a typical site, one content page should have one preferred sitemap location. Do not list every tracking, sorting, session, print, mobile, and redirecting variant merely because it is reachable.
Exclude obvious non-candidates
Review and normally remove:
- URLs that redirect elsewhere.
- 4xx and 5xx responses.
- Pages deliberately marked
noindex. - Alternate URLs canonicalized to another page.
- Duplicate parameter combinations.
- Search results or infinite filters with no intended search value.
- Private, authenticated, or environment-specific URLs.
Some exceptions exist. Confirm the site’s real architecture before applying rules in bulk.
Keep discovery and indexability separate
Being in a sitemap does not override robots controls, authentication, canonicals, or noindex directives. It also does not prove that a search engine has indexed the page.
Use a sitemap generator only after the URL set has been reviewed. Use page-level checks and Search Console separately when you need eligibility or private indexing evidence.
Use lastmod only when it is meaningful
An optional lastmod value can communicate a meaningful page change. It should not be refreshed because the sitemap was regenerated or because a footer changed across the site.
If your CMS cannot supply trustworthy modification dates, omit the field. Incorrect precision is not useful precision.
Generate from a durable source
For a small static website, a reviewed route list can be enough. As the site grows, generate the sitemap from the same database, CMS, or build process that knows the canonical public routes.
Manual XML becomes stale. Source-generated XML keeps changes reviewable and repeatable.
Verify after generation
- Deduplicate URLs and remove fragments.
- Confirm all locations are absolute HTTP or HTTPS URLs.
- Review mixed origins deliberately.
- Validate the XML structure and file limits.
- Publish the file at its intended public URL.
- Confirm the live response, content type, and declarations.
- Submit or monitor it in the appropriate search-engine property when available.
Google’s sitemap limits are 50,000 URLs or 50 MB uncompressed per file. Split larger sets and use a sitemap index where appropriate.
What generation cannot guarantee
A generated file is not automatically a useful file. It cannot decide which pages support the business, which duplicates should consolidate, or whether Google will crawl or index a location.
Use the free XML Sitemap Generator to turn a reviewed URL list into XML and copy an agent-ready deployment prompt.
Method note: generation happens in the browser from the URLs entered. The tool does not crawl the site or upload the result. Last reviewed 30 August 2026.



