Skip to content

Build an XML sitemap that supports discovery

An XML sitemap is a structured discovery hint. It works best when it contains the clean canonical URLs you want crawlers to find—not every address your application can generate.

Start free trial
  • Practical release checks
  • Clear limits
  • Built for operators

What to know before you change anything.

Include canonical, indexable URLs that return the intended public response. Use lastmod only when a meaningful page change occurred, publish the sitemap reliably, submit it in Search Console, and diagnose discrepancies without treating submission as an indexing guarantee.

  • Exclude redirects, error pages, and intentionally noindexed URLs.
  • Use one canonical representation of each included URL.
  • Do not update lastmod for cosmetic or unrelated deployment changes.

Use this process in the next release.

Keep every observation dated and every change tied to the earliest demonstrated issue.

  1. 01

    Define inclusion criteria

    Include only the canonical URLs that are intended to be public and considered for indexing.

  2. 02

    Generate reliable entries

    Use absolute URLs, a stable format, and lastmod values only when a material update actually happened.

  3. 03

    Publish and submit

    Make the sitemap available at a reliable URL, reference it where appropriate, and submit it in Search Console.

  4. 04

    Monitor and reconcile

    Review reported URLs against redirects, directives, canonicals, internal links, and the actual response before making changes.

A small checklist before you ship.

These checks make the diagnosis repeatable for another teammate.

  • Exclude redirects, error pages, and intentionally noindexed URLs.
  • Use one canonical representation of each included URL.
  • Do not update lastmod for cosmetic or unrelated deployment changes.
  • Retest the feed after a route or CMS migration.

Treat the sitemap as a maintained output of your URL policy.

A sitemap cannot repair hidden pages, broken responses, contradictory canonicals, or thin content. Use it alongside meaningful internal links and a clear public URL policy.

When a sitemap report shows an issue, compare the declared URL with the actual response and the page’s intended state before changing the feed.

Continue with the related guide.

Common questions

Bounded answers for the checks that most often get conflated.

Do I need a sitemap for every site?

A sitemap is particularly useful for larger, newer, or more complex sites, but important pages should still be discoverable through ordinary links.

Will submitting a sitemap index every URL?

No. Submission helps discovery and processing. Each URL still has to meet the other conditions needed for indexing and serving.

Turn technical SEO checks into a repeatable workflow.

Use Spacebrain to organize the work, the evidence, and the next owner around every release.

Start free trial