What an XML sitemap does
An XML sitemap lists URLs you want search engines to discover, plus optional metadata (last modified, changefreq, priority). It does not guarantee indexing or rankings - it reduces discovery friction, especially for new sites, large catalogs, and pages with weak internal links.
When you need one
- New domains with few external links
- Sites with deep architecture or faceted navigation
- Publishers adding spokes frequently (like this guides hub)
- After migrations - accelerate rediscovery of new URLs
Small static sites with strong internal linking may still benefit, but the uplift is smaller.
Sitemap types
- Standard: up to 50,000 URLs or 50MB uncompressed per file
- Sitemap index: points to multiple child sitemaps - use when you segment by content type
- News sitemap: for time-sensitive journalism (Google News eligibility rules apply)
- Image/video extensions: optional metadata for media-heavy pages
What to include and exclude
Include: canonical, indexable URLs you care about - articles, hubs, key landing pages.
Exclude: noindex URLs, redirects, duplicates, parameterized faceted URLs, admin routes, thank-you pages.
Implementation checklist
- Generate dynamically on publish/update (Next.js apps should include new posts automatically)
- Reference sitemap in
robots.txt - Submit in Google Search Console and Bing Webmaster Tools
- Segment large sites: posts, categories, static pages
- Set accurate
lastmodonly when content meaningfully changes
Debugging
- GSC "Couldn't fetch" - check HTTPS, auth walls, CDN blocks
- Submitted vs. indexed gap - often quality or duplicate issues, not sitemap failure
- Stale lastmod everywhere - crawlers may deprioritize signals
Pair with
Sitemaps support discovery; internal linking builds importance. Run both as part of your SEO audit.