LearnXML sitemaps

SEO fundamentals

XML sitemaps: what they do and how to build one right

An XML sitemap is a plain list of URLs you're telling search engines you'd like crawled — it's a discovery aid, not a ranking signal, and a badly maintained one can actively mislead a crawler.

An XML sitemap is a file, usually at /sitemap.xml, listing the URLs on a site along with optional metadata like lastmod (when a page last changed). Submitting one — via Search Console or a Sitemap: line in robots.txt — doesn't make Google index those pages, and it doesn't improve their ranking. What it does is give a crawler a direct list of URLs to check, which matters most for pages that are hard to discover through links alone: a new site with few inbound links yet, a large catalog where some products sit deep in the navigation, or a page that changed today and you'd like recrawled sooner rather than whenever a crawler stumbles onto it again.

What belongs in a sitemap

Only URLs you actually want indexed: canonical (not duplicate) URLs, returning 200, not blocked by robots.txt, and not marked noindex. A sitemap entry is a claim — "this is a real, indexable page" — and every entry that doesn't hold up erodes how much a search engine trusts the rest of the file.

Sitemap index files for large sites

A single sitemap file is capped at 50,000 URLs (and 50 MB uncompressed) by the sitemap protocol. Sites past that size use a sitemap index file — a small XML file listing multiple child sitemaps, each under the cap — so a million-URL site might ship one index file pointing at twenty 50k-URL sitemaps split by section or crawl date. Search engines fetch the index first, then work through each child file at their own pace.

what belongs vs. what doesn't
Belongscanonical, indexable, 200-status URLs you want discovered or recrawled sooner
Doesn't belongnoindex'd pages, robots-blocked URLs, redirects, 404s, duplicate/parameter variants
Past 50k URLssplit into a sitemap index file referencing multiple child sitemaps
The most common real-world mistake is the second row — sitemaps drift out of sync with robots and meta-robots changes.

The mistake that undermines trust in the whole file

The single most common problem in sitemaps we see on real sites: URLs that are noindex'd or blocked by robots.txt still listed in the sitemap, usually because the sitemap generator and the page templates drifted out of sync after a later change. Submitting a sitemap full of URLs a crawler isn't even allowed to fetch is a contradictory signal, and repeated contradictions make engines trust the rest of the file less, not just the bad entries.

Because a sitemap has to track the site's actual indexable state, not a one-time export, RacingRoach can generate a valid, size-split XML sitemap straight from a live crawl — so the file reflects what's really crawlable today, index-split automatically past 50k URLs, instead of a document someone hand-maintained and forgot to update.