XML Sitemaps: Structure, Limits and the Mistakes That Waste Crawl Budget
An XML sitemap is a list of the URLs you want crawled — nothing more, nothing less. The 50,000-URL and 50 MB limits, the one field Google still reads, and the mistakes that waste your crawl budget.

Every search engine that visits your site would rather not guess which pages matter. An XML sitemap is the file where you stop guessing for it: a machine-readable list of the URLs you want crawled, with a note on when each one last changed. It is supported by every major search engine, and it is still one of the most misunderstood files in technical SEO. Sites either ignore it completely, trusting crawlers to find everything through links, or they stuff it with every URL their database can produce and wonder why nothing improves.
This guide covers the structure the protocol actually requires, the hard limits that force large sites to split their files, which fields Google still reads and which it openly ignores, and the mistakes that turn a useful file into a list of URLs the crawler learns to distrust.
What a sitemap is, and what it is not
A sitemap is a hint, not an instruction. Google says this plainly in its own documentation: submitting a sitemap does not guarantee that Google will download it, crawl the URLs in it, or index any of them. A page still has to earn its place in the index on quality, on its canonical tag, and on whether anything blocks it. What the file does is make discovery cheaper. Instead of finding a new page only by following a link from a page it already knows, a crawler can read your list and go straight there. That matters most for pages that are hard to reach by links alone: new pages on a large site and pages buried deep in a category tree.
It is equally important to know what the file cannot do. It does not raise a page's ranking. It does not force indexing. A page missing from the sitemap is not hidden: crawlers still find pages by following links and by re-crawling URLs they already know. And a sitemap cannot rescue a page that is blocked by robots.txt, returns an error, or carries a noindex tag.
The anatomy of one entry
The format is deliberately small. A sitemap is a UTF-8 XML document whose root element is urlset, carrying the sitemaps.org namespace. Inside it, each page gets one url block, and each block has one required field: loc, the absolute URL of the page, including the protocol and the host. Everything else is optional.
The optional fields are lastmod, the date the page last changed; changefreq, a guess at how often the page changes; and priority, a number from 0.0 to 1.0 expressing the page's importance relative to the other URLs in your own file. Only lastmod still does real work, and only when it is honest. A few mechanical rules decide whether the file parses at all: URLs must be absolute, fully qualified and percent-encoded, and no single URL may exceed 2,048 characters. Special characters in URLs have to be escaped the way XML requires, so an ampersand in a URL becomes the escaped form, not a bare character that breaks the parser. A single unescaped character can make the whole file unreadable.
The hard limits
The protocol sets two hard limits per file: no more than 50,000 URLs, and no more than 50 MB uncompressed. Compression helps with bandwidth — a sitemap can be served gzipped as an .xml.gz file — but the limit applies to the uncompressed size, so gzip does not buy you room. A file that crosses either limit is not partially read; it is a file that breaks the protocol, and crawlers are entitled to stop trusting it.
Most sites never come near 50,000 URLs, and that is exactly why the limit catches people by surprise. It is not the blog that crosses it. It is the catalogue with a page per product variant, or the site that lists every filtered and sorted view of a category as its own URL. The count grows silently while nobody watches the file, and then one day the sitemap is over the limit and the newest pages — the ones that most need discovery — are the ones that fall off the end.
The answer is a sitemap index file. An index is a sitemap of sitemaps: its root element is sitemapindex, each child is a sitemap element with its own loc, and the index itself has the same limits — at most 50,000 child sitemaps. An index cannot contain another index, and child sitemaps normally live on the same host as the index that lists them.
lastmod: the one field that still matters
Google uses lastmod, but only on one condition: that it is consistently and verifiably accurate. When the dates in a sitemap match the real last modification of the pages, Google uses them to schedule re-crawls, so a page you actually updated gets visited again sooner and a page you did not touch is left alone. When the dates are fiction, Google stops believing them, and the field becomes as dead as the ones it ignores.
The most common way to destroy trust in lastmod is also the most common way to generate it: stamping every URL with the moment the sitemap itself was generated. Every page then claims to have changed at the same instant, every day, whether or not anything on it moved. A crawler that fetches a page on the strength of that date and finds nothing changed learns, quickly, that your dates mean nothing.
The fix is unglamorous and it is the whole point of the field. lastmod should be the date the page's content last changed in a meaningful way, written in the W3C datetime format — a plain date, or a full timestamp with a timezone. Tie it to the same event that changes the page: the publish date for a new article, the edit date for a revision, the date a product's details actually changed. If your site cannot produce a real modification date for a page, leave the field out for that page. An absent lastmod is neutral. A false one is a small lie the crawler remembers.
changefreq and priority: the fields Google ignores
Google has said plainly, in its own documentation, that it ignores both changefreq and priority. changefreq was meant to tell crawlers how often a page changes, but the values were guesses, and Google decided years ago to determine recrawl frequency from actual content changes and from lastmod instead. priority only ever expressed relative importance within your own file — it never affected ranking and never meant anything across sites — and because site owners routinely marked every page 1.0 or 0.9, Google stopped listening to it entirely.
Writing them is harmless in the strict sense: valid values cost nothing except bytes and attention. The real cost is the thinking they encourage. A team that spends an afternoon tuning priority values across five thousand URLs has spent an afternoon on a field no search engine reads, while the file still lists redirecting URLs and the lastmod dates are still generated at build time.
Sitemap index files: splitting with purpose
You do not need 50,000 URLs to benefit from splitting. A single file that mixes every page type on the site — blog posts, product pages, category pages, help articles — tells you nothing when something goes wrong. Split the file by section instead: one sitemap per content type, listed in an index, and each section becomes separately visible in Search Console. When the blog sitemap shows a spike in pages that are crawled but not indexed, you know the problem lives in the blog, not somewhere in a five-thousand-line file you have to grep by hand.
What belongs in the file — and what does not
A sitemap should list canonical URLs only: the one version of each page you want indexed, on the one host and protocol you actually serve. That single rule eliminates most of the junk in real sitemaps. Do not list a URL that redirects somewhere else; list the destination. Do not list a URL that returns an error; fix the page or remove it. Do not list a page that carries a noindex tag or is blocked by robots.txt — asking a crawler to fetch a page you have also told it not to index is a contradiction, and contradictions are resolved in favour of the blocking signal, not the sitemap.
The same rule applies to parameter URLs. A category page with a sort order, a filter combination or a tracking parameter is usually not a page you want indexed, and listing hundreds of its variants turns the sitemap into a catalogue of near-duplicates. List the clean canonical URL once. The same goes for paginated archives beyond the first page, for internal search result pages, and for the auto-generated tag pages a content system creates by default.
The mistakes that waste crawl budget
Crawl budget is not a number Google publishes for your site; it is the practical reality that a crawler will only fetch so many of your pages in a given period. Every fetch spent on a URL that should never have been listed is a fetch not spent on a new page that needs discovery. The mistakes that waste it are mundane, which is why they survive so long. Stale URLs that have redirected or died months ago. Thousands of parameter variants of the same ten pages. A lastmod date that sends the crawler back to pages that have not changed. A sitemap that lists the entire database, including drafts, test pages and the admin area's public-facing leftovers.
A subtler waste is the sitemap that is generated once and never maintained. The site grows, sections are retired, URLs change, and the file quietly drifts away from the site it describes until it lists pages that no longer exist and omits the pages that were launched last quarter. The fix is to generate the sitemap from the same source of truth as the site itself — the live content, not a static export — and to check it on a schedule. A monthly look at the Search Console sitemap report, which shows how many submitted URLs were actually indexed, is the cheapest audit in technical SEO.
There is one more habit worth retiring. Google retired its unauthenticated sitemap ping endpoint in late 2023, after finding that most of the traffic it received was noise. The old advice to ping Google every time the sitemap changes is dead. What replaced it is simpler: keep the sitemap referenced from robots.txt, submit the index in Search Console, and let the crawler find updates through the file itself and through lastmod. Bing accepts sitemap submissions in its own webmaster tools, and IndexNow exists for sites that want new and changed URLs announced to participating engines immediately rather than waiting for the next crawl.
A lean starting structure
Most sites need less sitemap than they think. Start with an index at /sitemap.xml that lists one child sitemap per section of the site. Each child lists the canonical URLs of that section and nothing else, with an honest lastmod on each one and no changefreq or priority. Point at the index from robots.txt, submit the index in Search Console and in Bing Webmaster Tools, then watch the report that shows how many of the submitted URLs are indexed.
Revisit the file whenever the site changes shape: after a redesign, after a migration, after launching a new section, and after retiring one. A sitemap that describes last year's site is worse than no sitemap, because it actively sends the crawler to the wrong places. A file that is small, honest and current does more for discovery than a file that is large, stale and full of guesses.
This article is educational guidance on search crawling and XML sitemaps; crawler behaviour, search features and the formal standard change, rankings and visibility vary by site, implementation, competition and execution, and nothing here guarantees a ranking or any number of new visitors.
Recommended products
Keep reading
- Crawl Budget Optimization: Stop Wasting Google's TimeIf Googlebot wastes 60% of its time on filter URLs, your real pages don't get crawled. Here's how to fix it.
- Indexation Problems: Why Google Won't Index Your Pages and How to Fix Each CauseA page that isn't indexed never appears in search, however good it is. The fix starts with reading the exact status Search Console gives you.
- The 2026 Technical SEO Audit Checklist (40 Checks)Forty technical SEO checks every site should pass in 2026 — with the fix patterns engineers actually need.
Explore the full Zeshly product suite, read more on the Zeshly blog, or head back to the homepage.
Ready to put this into practice?
Spin up Zeshly free for 14 days and ship the playbook above on your own site.