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.
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
XML sitemap validator
Find your sitemap, count URLs, flag empty or HTML responses, and sample whether listed pages respond.
Open tool →Free website checker
Paste a public URL for one report from server HTML plus Google PageSpeed. Use the extension for localhost, JS-heavy apps, and the full audit.
Open tool →Canonical tag checker
Check rel=canonical for missing tags, www/https mismatches, and paths that do not match the live URL.
Open tool →More guides
Website not indexing in Google: a practical troubleshooting checklist
Why new or updated pages stay out of Google, how to read Search Console statuses, and which on-page fixes to try first.
Read · 9 min →Security headers explained: HSTS, CSP, and the six that matter at launch
What HSTS, Content-Security-Policy, X-Frame-Options, and related headers do, which ones to ship first, and how to check them on a live URL.
Read · 8 min →Schema markup for small sites: JSON-LD that helps Google and AI answers
Which schema types small sites actually need, how to add JSON-LD safely, and how structured data helps rich results and AI citation—not magic rankings.
Read · 9 min →