What is an XML sitemap?
What belongs in a sitemap and what does not, the 50,000-URL limit and sitemap index, and the honest line between discovery and indexing.
An XML sitemap is a file that lists the URLs on your site you want search engines to know about, in a format built for machines rather than people. It is a discovery aid: it helps crawlers find your pages and learn when they last changed, which matters most on large sites, new sites, and sites with pages that are not well linked internally.
What it looks like
At its simplest, an XML sitemap is a list of <url> entries, each with a <loc> (the address) and optionally a <lastmod> (when it last meaningfully changed). Google uses <lastmod> when it is accurate and ignores it when it is not — a file that claims every page changed today, every day, teaches Google to distrust the field. The old <priority> and <changefreq> tags are effectively ignored now; do not spend effort on them.
The one rule for what goes in it
A sitemap is a list of your canonical, indexable, 200-OK URLs — the pages you actually want in search results — and nothing else. That single rule rules out the most common contents that should not be there:
No redirects. A URL that 301s belongs to its destination; list the destination. No non-canonical duplicates. List only the canonical version, or you send Google mixed signals about which URL is primary. No noindexed pages. Telling Google to index a page in the sitemap while telling it not to in a noindex tag is a direct contradiction. No 404s or error pages. A sitemap full of dead URLs teaches Google the file is stale and worth trusting less.
The reason to be strict is that the sitemap is a quality signal in aggregate. A clean sitemap of exactly the URLs you want indexed helps Google spend its crawl budget on the right pages. A sitemap padded with redirects, duplicates and dead links does the opposite.
Size limits and the sitemap index
A single sitemap file can hold up to 50,000 URLs and must be no larger than 50 MB uncompressed. Past that, you split into several sitemaps and list them in a sitemap index — a sitemap of sitemaps. Large sites often split by section (products, articles, categories) not only to stay under the limit but because it makes the Search Console coverage numbers readable: if indexing drops, you can see which section it dropped in.
How to submit it
Two things, both worth doing. Add a Sitemap: line to your robots.txt pointing at the file, so any crawler that reads the robots file finds it. And submit it in Google Search Console under Sitemaps, which also gives you a report on how many of its URLs were discovered and indexed. You do not need to resubmit it every time it changes — Google recrawls known sitemaps on its own — and manual resubmission does not speed up indexing, a myth worth retiring.
What a sitemap will not do
It will not get a thin or duplicate page indexed. It will not rescue a page Google has crawled and judged not worth keeping. And it will not compensate for weak internal linking — if a page appears only in the sitemap and nothing on the site links to it, Google often treats it as low priority and leaves it as discovered, currently not indexed. A sitemap is one discovery path; internal links are the stronger one, and the two work together rather than one replacing the other.
How to check yours
Our sitemap checker fetches your sitemap and flags the contents that should not be there — redirects, noindexed URLs, non-canonical duplicates, broken links — which is the fastest way to find the stale entries that quietly erode the file’s value. Pair it with the indexability checker to confirm a listed URL is genuinely indexable, and read the Page indexing report reference to understand the discovered-versus-indexed numbers Search Console reports back for the file. Or run a full site check to see it in context with the rest of your technical setup.
Frequently asked questions
- What is an XML sitemap?
- An XML sitemap is a machine-readable file that lists the URLs you want search engines to know about, each with an optional last-modified date. It helps crawlers discover your pages and decide what to recrawl, which matters most for large sites, new sites, and pages that are not well linked internally. It is a discovery aid, not a ranking or indexing guarantee.
- Does an XML sitemap help SEO?
- It helps discovery, which is a prerequisite for ranking but not the same thing. A sitemap makes sure Google knows your pages exist and gives it last-modified hints for recrawling. It does not force pages to be indexed or improve their position — a clean sitemap of exactly your canonical, indexable URLs simply helps Google spend crawl budget on the right pages.
- What should I include in an XML sitemap?
- Only your canonical, indexable, 200-OK URLs — the pages you actually want in search results. Exclude redirects, non-canonical duplicates, noindexed pages, and anything returning a 404. A sitemap padded with those contents becomes a stale signal that Google trusts less, whereas a clean one helps it prioritize the pages that matter.
- How many URLs can a sitemap contain?
- A single sitemap file can list up to 50,000 URLs and must be no larger than 50 MB uncompressed. Beyond that, split the URLs across multiple sitemaps and reference them from a sitemap index file — a sitemap of sitemaps. Large sites often split by section anyway, because it makes Search Console's coverage numbers easier to read.
- How do I submit a sitemap to Google?
- Add a Sitemap: line to your robots.txt pointing at the file, and submit the sitemap in Google Search Console under the Sitemaps report. You do not need to resubmit it whenever it changes — Google recrawls known sitemaps automatically — and manual resubmission does not speed up indexing despite the common belief that it does.
- Why are my sitemap URLs discovered but not indexed?
- A sitemap only tells Google a URL exists; it does not compel indexing. If a page appears in the sitemap but nothing on your site links to it, Google often treats it as low priority and leaves it as 'Discovered — currently not indexed'. Internal links are the stronger discovery and priority signal, so link to important pages from other pages rather than relying on the sitemap alone.