On a 40-page site, an XML sitemap is a formality. Google finds every page through internal links within a crawl or two, and the file mostly confirms what the crawler already knows. On a site with 20,000 or 200,000 URLs, the sitemap becomes something different: it is the one place where you state, in machine-readable form, which URLs you believe deserve to be crawled and indexed. Everything about how Google treats that statement depends on how accurate it has been in the past.
That is the idea this guide is built around. A sitemap is not a dumping ground for every URL your CMS can generate. It is a curated, segmented, honestly dated list that doubles as a diagnostic instrument. We will cover how to structure a sitemap index, how to respect the file limits, how to keep lastmod truthful, why noindexed or redirected URLs must never appear (and what Search Console says when they do), how to use sitemap segments to find indexing problems, and how to automate and monitor the whole thing.
Crawling is a budgeted activity. Google decides how often to fetch a host based on how fast the server responds, how popular and fresh the content appears, and how much of what it has fetched turned out to be worth keeping. On a small site none of this matters because the crawler can afford to be thorough. On a large one, Googlebot has to choose, and your sitemap is one of the clearest signals you control for that choice.
Consider a multi-location HVAC company with 600 city pages, 450 blog posts, 80 service pages, and a faceted gallery that produces thousands of filter URLs. Internal linking may bury city pages four clicks deep, and the blog archive may paginate to page 40. A sitemap gives discovery a second path that does not depend on link depth. It also tells Google which of those URLs are canonical, indexable, and current, which is information the crawler would otherwise have to infer page by page.
There is a second, less obvious benefit: measurement. Search Console lets you filter the Page indexing report by sitemap. If you submit one undifferentiated file with everything in it, you can see only an aggregate. If you submit segmented files, you can see that blog posts index at 96 percent while city pages index at 41 percent, and that single comparison tells you where to spend the next month. We will come back to this in the diagnostics section.
Once you pass a few thousand URLs, stop thinking about one sitemap and start thinking about a sitemap index: a small XML file at /sitemap_index.xml that lists child sitemaps. You submit only the index in Search Console, and Google reads every child from it. The index can reference up to 50,000 sitemap files, which is far more room than almost any site needs.
The question is how to split the children. Splitting purely by count (urls-1.xml, urls-2.xml) satisfies the limits but wastes the diagnostic value. Split by what the URL is, so that each file represents a population with its own expected indexing behavior:
- sitemap-pages.xml for core pages: home, service pages, about, contact, pricing.
- sitemap-locations.xml for city, neighborhood, or location landing pages. These are the most prone to quality-based exclusion, so isolating them is worth the effort.
- sitemap-blog.xml for editorial articles, split by year or by category once it nears the size limits.
- sitemap-products.xml for ecommerce or service-package URLs, split further by category if the catalog is large.
- sitemap-images.xml, sitemap-videos.xml, sitemap-news.xml only where those media types matter to you.
Also reference the index in robots.txt with a Sitemap: line, so every crawler can find it without a manual submission. Child sitemaps must live on the same host and, unless you submit them through a sitemap index or Search Console, within the path scope they cover. Putting them at the root avoids scope surprises. Use fully qualified, canonical URLs everywhere: the protocol and hostname in the sitemap should match your canonical choice, including https and the www or non-www form.
Each sitemap file may contain at most 50,000 URLs and be no larger than 50 MB uncompressed. Gzip compression is fine for delivery, but the limit applies to the file after decompression. Exceeding either cap makes the file unreadable in part or in full, and Search Console will report a processing error.
In practice the URL count is rarely your first constraint; the byte size can be. A sitemap with image or video extensions adds a lot of markup per URL, and long URLs with tracking parameters or deeply nested paths consume space quickly. Do the arithmetic early: if an average entry is 400 bytes, 50,000 entries is about 20 MB, which is comfortable, but an entry carrying six image tags and hreflang alternates can run several kilobytes.
A sound operating rule is to cap each child at a number well below the ceiling, such as 10,000 to 25,000 URLs. This does three things. It leaves headroom so a surge in content never silently breaks a file at 50,001. It makes files faster to generate, validate, and fetch. And it keeps each file small enough that when you see a coverage problem, you can sample it by eye.
When a segment outgrows the cap, chunk it deterministically. For blog content, split by publication year (sitemap-blog-2025.xml). For products, split by category. Avoid chunking by arbitrary offset, because adding one new URL at the top shifts every later URL into a different file and scrambles per-file reporting.
Of the optional sitemap fields, lastmod is the only one Google says it uses, and the condition is attached: it uses the value when it has proven consistently and verifiably accurate. The priority and changefreq fields are ignored, so you can drop them and save the bytes.
The failure mode is common and quiet. A developer wires the sitemap generator to output the current timestamp for every URL on every build. Every page now claims to have changed today, every day. Google compares a claimed change against what it sees on recrawl, finds no meaningful difference, and learns that your lastmod values do not predict real changes. From then on the field is discounted across the host, including for the pages where you really did publish an update.
Honest lastmod follows a few rules:
- Tie it to a meaningful content change. A rewritten paragraph, a corrected price, a new FAQ entry, an updated phone number: yes. A footer year, a rotating sidebar widget, a CSRF token, or a comment count: no.
- Source it from your data, not your build clock. Use the content record's last-substantive-edit timestamp, a hash of the main content, or a field editors can set deliberately. Do not use file modification time if a deploy touches every file.
- Use the full W3C datetime format (for example
2026-10-06T14:30:00+00:00) or a plain date. Be consistent. - Never let a date move backward or into the future. A future lastmod is a red flag that your timestamp logic is broken.
- Keep it aligned with on-page signals. If the sitemap says October 6 and the visible article says it was last updated in March, one of them is wrong, and Google can see both.
The sitemap should contain only URLs that return 200, are indexable, and are the canonical version of their content. This is the single most violated rule on large sites, and it is the one Search Console calls out explicitly. Each of the following belongs outside the file:
- Noindex URLs. Listing a page in the sitemap says index this, while its meta robots tag or X-Robots-Tag header says do not index. Search Console reports this as a submitted URL marked noindex. It is a direct contradiction of your own signals, and Google will honor the noindex, but the conflict is a symptom of a generator that is not synchronized with your indexation rules.
- Redirected URLs. A 301 or 302 in the sitemap forces Google to follow a hop to find the real page. Put the final destination in the file instead. After a migration, regenerate immediately rather than leaving old paths listed.
- Canonicalized-away URLs. If a URL canonicalizes to a different page, it should not be listed; only the canonical target should be. Parameter variants, print versions, and trailing-slash duplicates commonly slip in.
The principle is that every URL in the sitemap is a promise. When a meaningful share of the promises fail, Google reasonably treats the whole file as lower-quality input. The fix is structural rather than manual: have the generator apply the same rules your site applies. If a template sets noindex, the generator must read that same flag. If a page canonicalizes elsewhere, the generator should exclude it using the same logic. One shared source of truth for indexability prevents the drift.
A practical check is to crawl your own sitemap URLs with a crawler configured to report status code, indexability, and canonical target, then filter for anything that is not a 200, self-canonical, indexable page. The output should be empty. A pass of the website SEO audit is a fast way to catch the obvious cases before you run a deeper crawl.
Not every site needs media sitemaps. Add them when the content type is a real traffic source and normal crawling is not reliably surfacing it.
Image sitemaps use an extension namespace that attaches image:image and image:loc entries to a page URL. They help when images are loaded through JavaScript, served from a CDN on another domain, or are central to discovery, such as a portfolio of completed projects, a recipe site, or product photography. Google has deprecated the optional caption, title, and license image tags, so only the location is worth including. For a contractor whose before-and-after galleries are lazy-loaded, listing them can make the difference between those images being found and being missed.
Video sitemaps carry fields such as thumbnail location, title, description, and either a content or player location. They matter if you self-host video and want it eligible for video results. If your videos are embedded from a major platform and you only want the platform's page to rank, you may not need one.
News sitemaps apply only to sites approved for Google News and publishing timely articles. They should list only articles from roughly the last two days and hold at most 1,000 URLs. A local publisher with a daily news desk is the right user; a service business blog is not.
Two practical notes. First, media extensions can live inside your regular page sitemaps, which keeps related data together, or in dedicated files, which keeps size down and reporting clean. For large media catalogs, dedicated files are usually better. Second, the same inclusion rules apply: an image tied to a noindexed page, or a video on a page that returns a 404, should not be listed.
This is where segmentation pays off. In the Page indexing report, you can switch the scope from all known pages to all submitted pages, or to a single sitemap. That filter turns each child file into its own coverage report.
Start with the ratio for each segment: submitted URLs against indexed URLs. Then read the reasons attached to the non-indexed ones. Different statuses point to different problems:
- Discovered, currently not indexed usually means Google knows the URL but has not prioritized crawling it. On large sites, this often signals weak internal linking or a perceived low value for the whole segment.
- Crawled, currently not indexed means Google fetched the page and decided not to keep it. This is a quality or duplication signal. If your location pages sit here at scale, the pages are probably too similar to one another.
- Submitted URL marked noindex means the sitemap-versus-noindex conflict described above. Every instance is a generator bug or a template mistake.
- Page with redirect or Submitted URL not selected as canonical means the file includes URLs it should not.
A worked example: a regional service company submits 1,200 URLs across four child sitemaps. Core pages show 98 percent indexed, blog 93 percent, products 88 percent, and city pages 52 percent, with most of the gap in crawled-not-indexed. Without segmentation, the aggregate of about 80 percent would look acceptable. With it, the city-page population is clearly the problem, and the response is to differentiate those pages, consolidate near-duplicates, or prune weak ones, not to resubmit the sitemap.
Use the URL Inspection tool to sample individual URLs from a failing segment and see the last crawl, the user-declared canonical, and the Google-selected canonical. Also remember that the Sitemaps report itself shows the last read date, discovered URL count, and any parse errors, so check it after every structural change.
Hand-maintained sitemaps break the first time a team ships a migration. Generate them programmatically from the same data source that renders the site, and treat them like any other build artifact.
Generate from the source of truth. Query your database or content API for published, indexable, canonical URLs only, using the same boolean the templates use to emit the robots tag. Emit each URL into its segment, set lastmod from the real edit timestamp, and write the index last. On static site generators, produce the files as a post-build step. On a CMS, use a plugin or a scheduled job, but verify it respects your noindex and canonical settings, because defaults vary and many plugins include everything.
Do not rely on ping endpoints. Google retired its sitemap ping service, so the reliable discovery channels are the robots.txt Sitemap: directive and the Search Console submission. Resubmitting an unchanged file does nothing useful.
Add automated tests. A pre-deploy check should fail the build if any child file exceeds your internal cap, if any URL in a sitemap returns a non-200 status, carries noindex, or has a canonical pointing elsewhere, or if lastmod values are identical across thousands of URLs. A simple script that samples 200 URLs per file takes minutes to write and prevents the worst regressions.
Monitor the trend. Each week, record submitted versus indexed counts per segment from Search Console, and watch for three things: a sudden drop in submitted URLs (the generator broke), a rising count of noindex or redirect exclusions (the generator drifted), and a widening gap between submitted and indexed in one segment (a quality problem emerging). Set an alert on the first two.
Do I need a sitemap index if my site has fewer than 50,000 URLs?
Not strictly, but it is still worth it. A sitemap index lets you split files by content type, which gives you separate indexing reports in Search Console for pages, blog posts, locations, and products. That segmentation is the main diagnostic advantage, regardless of whether you are anywhere near the size limit.
Does Google use priority and changefreq in sitemaps?
No. Google has said it ignores both fields, so they do not influence crawling or ranking. The optional field that matters is lastmod, and only when the dates are consistently accurate. Leave out priority and changefreq to keep files smaller, and invest the effort in making lastmod reflect real content changes.
What happens if noindexed URLs are in my sitemap?
Google will respect the noindex and keep the page out of the index, and Search Console flags the URL as submitted but marked noindex. The conflict wastes crawl attention and signals that your sitemap is not synchronized with your indexing rules. Remove those URLs, or if the page should be indexed, remove the noindex.
How often should a sitemap be regenerated?
At least nightly for active sites, and ideally whenever content is published, unpublished, or moved. The goal is for the file to match the live site at all times. Update lastmod only when the content materially changes, not on every rebuild, or Google will learn to ignore the dates.
Should I include paginated or filtered URLs in my sitemap?
Generally no. Faceted filters, sort parameters, and deep pagination pages are usually duplicates or low-value, and they are often canonicalized to a parent. List the canonical category or hub page instead. Include a paginated URL only if it is self-canonical, indexable, and offers distinct content you want found.
Turn this into a practical SEO action plan
Use RankLocalToday tools to check rankings, diagnose website issues, and prioritize the next organic traffic move.
Get your SEO plan →More in this topic: Website SEO, all 208 guides →