A docs sitemap should make the canonical public hierarchy obvious. This example emphasizes docs home, setup, reference, and policy paths rather than every low-value archive or parameter variant.
Example file
This is not about XML perfection. It is about making the important docs hierarchy easy to discover.
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc>https://example.com/docs</loc></url>
<url><loc>https://example.com/docs/getting-started</loc></url>
<url><loc>https://example.com/docs/setup</loc></url>
<url><loc>https://example.com/docs/reference</loc></url>
<url><loc>https://example.com/pricing</loc></url>
<url><loc>https://example.com/privacy-policy</loc></url>
</urlset>The point is not to keep the sitemap tiny forever. The point is to make the canonical public structure unmistakable.
Why this shape helps
Before you ship it
Related pages
See how docs-focused references differ from a SaaS-oriented file.
See how canonical tags should point assistants toward the stable docs version, not stale duplicates.
A checklist focused on canonical docs structure, navigation, and citations.
See where each file helps and where it does not.
Next step
If the docs structure is still fragmented, fix that first. Once the hierarchy is stable, the sitemap becomes a strong discovery layer rather than a bandage.