XML sitemap guide: what to include, what to skip, and how to submit it

How sitemap.xml helps Google and Bing find your pages, which URLs belong in it, lastmod honesty, and how to submit it in Search Console.

By Sumit JhaUpdated October 17, 20268 min readFor: Indie hackers and agencies shipping marketing sites

Short answer

An XML sitemap lists the public URLs you want crawled. Include indexable pages only—no thank-you, checkout success, or noindex URLs. Keep lastmod accurate, submit the sitemap in Google Search Console and Bing Webmaster Tools, and re-check after big launches.

After you publish a sitemap, set up Google Search Console and optionally IndexNow for Bing.

Why sitemaps matter

A sitemap is a machine-readable list of URLs you want crawled. It does not replace internal links, but it helps Google and Bing discover new or deep pages faster—especially on new sites.

What to include

  • Public, indexable marketing and content pages
  • Canonical URLs only (the ones you want in search)
  • Accurate lastmod when you know it

What to skip

  • Thank-you, checkout success, and cart pages
  • Pages with noindex or login walls
  • Staging hosts and preview deploy URLs
  • Parameterized duplicates already consolidated by canonical

Submit and monitor

Submit the sitemap in Search Console and Bing Webmaster Tools. Watch for “Discovered – currently not indexed,” soft 404s, and excluded by noindex. Pair with the not indexing checklist when URLs stall.

Audit titles and tags

First validate discovery with the free XML sitemap validator. A sitemap only lists URLs. For titles, descriptions, and OG tags across many pages, use the Pro sitemap SEO audit. For a single URL, start with the website checker. For faster Bing pickup after deploys, pair with the IndexNow key checker.

Questions

Where should sitemap.xml live?

Usually at https://yoursite.com/sitemap.xml. Mention it in robots.txt with Sitemap: https://yoursite.com/sitemap.xml.

Do I need lastmod?

Helpful when it is honest. Fake lastmod on every deploy can reduce trust. Update it when the page content meaningfully changes.

How many URLs can a sitemap hold?

Up to 50,000 URLs or 50MB uncompressed per file. Split into a sitemap index if you grow past that.

Does a sitemap guarantee indexing?

No. It helps discovery. Indexing still depends on quality, crawlability, and no accidental noindex.

Tools for this guide