XML Sitemaps: What to Include and How Search Engines Use Them
An XML sitemap is a list of URLs you want indexed. Keep it to canonical pages that return 200, keep lastmod honest, and use it to spot indexing gaps. Here are the limits and a 15-minute audit.
An XML sitemap is a file that lists the URLs you want search engines to find and index. Include only canonical pages that return a 200 status and are allowed in search. Keep each file under 50,000 URLs, and set lastmod to the real date the content changed. Then use it to find pages that never got indexed.
That's the whole job. Most sitemap advice stops at "make one and submit it." The part that pays is using the sitemap as a promise list. Every URL in it says "this page is worth indexing." When the promise list is dirty, search engines learn to trust it less.
This guide covers what to include, the limits Google and Bing publish, how each engine uses the file, and a 15-minute audit. If you just want to check a file now, paste it into the free XML sitemap validator.
Key takeaways
- A sitemap is a promise list. Every URL in it should be canonical, indexable and return a 200 status.
- Two limits matter. 50,000 URLs and 50MB uncompressed per file, then split into a sitemap index.
- Only lastmod counts. Google and Bing ignore priority and changefreq, and trust lastmod only when it's accurate.
- Submission is a hint. A sitemap helps discovery, but it never forces indexing.
- The real value is the gap. Compare submitted URLs with indexed URLs to find what search engines skipped.
What is an XML sitemap?
An XML sitemap is a machine-readable list of the pages on your site. It follows the Sitemap Protocol. Each entry holds a URL and, optionally, the date it last changed. Search engines read it to find pages they might miss by following links.
Links are still the main way search engines find pages. Google's SEO Starter Guide says "the vast majority of the new pages Google finds every day are through links." So a sitemap is a backup path, not the main road. It helps most on large sites, new sites with few backlinks, and sites that change pages often.
Here is a minimal valid file:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.example.com/blog/xml-sitemap-guide</loc>
<lastmod>2026-12-02T09:00:00+00:00</lastmod>
</url>
</urlset>
Google also accepts RSS, Atom and plain text sitemaps, and its build and submit a sitemap guide says it has no format preference. I still use XML, because Bing prefers it for the lastmod field.
What should go in an XML sitemap, and what should stay out?
Put a URL in the sitemap only if you would be happy to see it ranking. Google's guide says to include only URLs you want in search results, preferably canonical ones. It also says to use "fully-qualified, absolute URLs," because Google crawls them exactly as written.


| Include | Leave out | Why |
|---|---|---|
| Canonical URLs that return 200 | URLs that 301 or 302 to another page | A 301 redirect target should be listed, not the old URL |
| Pages allowed to be indexed | Pages with a noindex tag | Two opposite signals confuse crawlers |
| The one version you chose | Parameter, sort and filter duplicates | Point duplicates to the main page with a canonical tag |
| Pages that robots.txt allows | Pages blocked in robots.txt | A crawler can't read a page it isn't allowed to fetch |
| Absolute URLs on the right protocol and host | Relative paths, http on an https site, staging hosts | Google fetches the exact string you list |
| Pages with real content | Thin tag pages, empty search results, login pages | They waste crawl time and lower trust in the list |
Every row on the right is a mismatch between the sitemap and the page. The canonical tags guide and the robots.txt guide cover the signals that have to agree with it.
What are the XML sitemap limits?
Google and Bing publish nearly the same limits. When a site outgrows one file, you split the URLs across several sitemaps and list those files in a sitemap index.
| Limit | Value | Source |
|---|---|---|
| URLs per sitemap | 50,000 | Google and Bing |
| File size per sitemap | 50MB uncompressed | |
| Encoding | UTF-8, with entity-escaped values | |
| Entries per sitemap index | 50,000 | Google and Bing |
| Index files you can submit per site in Search Console | 500 | |
| News entries per news sitemap | 1,000, for articles from the last two days |
The sources are Google's sitemap index rules, Bing's July 2025 post on sitemaps in AI powered search, and Google's news sitemap docs. Google also says child sitemaps must live on the same site as the index, in the same directory or deeper, unless you set up cross-site submission.
Split by page type, not by count alone. One sitemap for blog posts, one for product or feature pages, one for docs. Then the Search Console report shows you which page type has an indexing problem.
How do Google and Bing use your sitemap?
Both engines treat the sitemap as a hint about what exists and what changed. Neither promises to crawl every URL. But they read the optional tags differently, and that changes how you should build the file.
| Question | Bing | |
|---|---|---|
| Uses priority and changefreq? | No, ignores both | No, ignores both |
| Uses lastmod? | Only if "consistently and verifiably accurate" | Yes, and asks for full date and time in ISO 8601 |
| How to submit | Search Console, Search Console API, robots.txt | Bing Webmaster Tools, robots.txt |
| Faster change signal | WebSub, for RSS and Atom feeds only | IndexNow, for any URL |
| Promise to index? | No, submission is "only a hint" | No, and no promise on AI answers either |
Google's guide says lastmod should reflect significant updates to main content, structured data or links. A changed copyright year doesn't count. If your CMS stamps every URL with today's date on every build, Google learns to ignore your lastmod entirely.
Bing goes further. Its 2025 post says Bing fetches a sitemap right after you submit it and rechecks it at least once a day. It also says accurate lastmod values help Bing focus crawling on changed pages, for both search and Copilot answers. That matters because Bing's index feeds more AI answers than most teams assume. The Bing SEO guide covers that side.
How do you submit a sitemap?
Do all three of these once. They take about ten minutes.
- Add it to robots.txt. Add a line like
Sitemap: https://www.example.com/sitemap.xml. Google allows several Sitemap lines. Both engines read this file. The free robots.txt generator writes the line for you. - Submit it in Google Search Console. Use the Sitemaps report. It shows when Googlebot last read the file and any parse errors. The Google Search Console guide walks through the reports.
- Submit it in Bing Webmaster Tools. Then set up IndexNow so new and changed URLs reach Bing the same day.
Place the sitemap at the root of your site. Google's guide says a sitemap only covers URLs in its own folder and below, unless you submit it through Search Console. A root file covers everything.
How do you read the Sitemaps report?
Google's Sitemaps report help page lists three statuses. "Success" means the file loaded and every URL is queued for crawling. "Has errors" means the file loaded but some entries failed. "Couldn't fetch" means Google couldn't get the file at all.
The useful number is not "Discovered pages." It's the gap between discovered and indexed. Google says "there is no guarantee that a page URL discovered in a sitemap has been or will be crawled or indexed." So filter the Page indexing report by sitemap. That shows how many of your promised URLs made it into the index.
Two limits to know. The report only shows sitemaps you submitted through the report or the API. And it shows no data for image, video or news URLs.
Worked example: a 15-minute sitemap audit
Say a B2B SaaS site has a sitemap with 1,400 URLs. You crawl every URL in it and sort them by what you find. Here's what a messy but typical result looks like.


| Status of the URL | Count | Action |
|---|---|---|
| Canonical, indexable, 200 | 1,040 | Keep |
| Redirects to another URL | 180 | Replace with the final URL |
| Canonical points elsewhere | 110 | Remove, list the canonical instead |
| Has a noindex tag | 50 | Remove from the sitemap |
| Returns 404 or 410 | 20 | Remove, and fix internal links |
That's 360 bad entries out of 1,400, or about 26%. Every one is a broken promise. Now say Search Console shows 900 of the 1,040 clean URLs indexed. That leaves 140 good pages that Google found and skipped.
Those 140 pages are your real to-do list. They usually fall into three groups. Some are thin or near-duplicate pages. Some are orphan pages with no internal links pointing in. And some are fine pages on a slow or bloated site where crawl budget runs short. The crawl budget guide covers that last case.
What mistakes break sitemaps most often?
I see the same five problems on almost every site I audit. Most come from a CMS or framework default that nobody checked.
- Fake lastmod dates. The build stamps every URL with today's date. Set lastmod from the content's real update time instead.
- Staging or http URLs. The generator reads the wrong base URL. Check that every loc matches your live host and protocol.
- Every URL ever made. Tag pages, author pages and paginated archives go in by default. Prune them to what you want ranked.
- A stale static file. Someone uploaded a sitemap two years ago and the site moved on. Generate it from your content source on every deploy.
- A sitemap with no internal links behind it. The sitemap gets pages found. Internal links get them valued. You need both.
On a custom-coded site, build the sitemap from the same data that builds the pages. The Next.js on Vercel SEO guide shows that pattern. If you run on HubSpot, its CMS generates the file for you, and the HubSpot XML sitemap guide covers its settings.
When does a sitemap matter most?
A sitemap matters most when links alone won't get pages found fast. That's three kinds of sites.
The first is a large site. Programmatic SEO builds can ship thousands of pages at once, far more than internal links surface on day one. The programmatic SEO guide covers how to roll those out without flooding the index.
The second is a new site with few backlinks. Crawlers have few paths in, so the sitemap does more of the finding.
The third is a site that changes often, where lastmod and IndexNow tell engines what to recrawl. For a 30-page brochure site with solid navigation, a sitemap is nice to have. For everyone else, it's table stakes and a free diagnostic.
What to do this week
A sitemap is a small part of indexing, but it's the part you fully control. Keep it clean and it becomes the best early warning you have for pages search engines skip. For the full picture of crawl and index health, run the technical SEO audit. If you want a team to own search and AI answers end to end, that's our SEO and AEO service, and the AI search visibility use case shows how the pieces fit.
FAQ
Do I need an XML sitemap?
Small sites with good internal links can get by without one. But a sitemap costs almost nothing and helps in three cases: large sites, new sites with few backlinks, and sites that publish or change pages often. It also gives you a clean list to compare against what Google and Bing actually index, which is the most useful part for most teams.
How many URLs can an XML sitemap have?
Google and Bing both cap a single sitemap at 50,000 URLs. Google also caps the file at 50MB uncompressed. Bigger sites split their URLs across several sitemaps and list them in a sitemap index file. An index file can also hold up to 50,000 entries, and Google lets you submit up to 500 index files per site in Search Console.
Does Google use priority and changefreq?
No. Google's documentation says it ignores the priority and changefreq values. Bing says the same. The only optional tag that matters is lastmod, and both engines only trust it when it is accurate. Leave priority and changefreq out, or leave them in if your CMS adds them. They do no harm, but they do no good either.
Should noindex pages be in my sitemap?
No. A sitemap should list only the URLs you want shown in search results. Putting a noindex page in the sitemap sends two opposite signals. The same goes for redirected URLs, pages that return errors and non-canonical duplicates. Keep the sitemap to canonical URLs that return a 200 status and are allowed to be indexed.
How do I submit a sitemap to Google and Bing?
Add a Sitemap line with the full URL to your robots.txt file, which both engines read. Then submit it in Google Search Console's Sitemaps report and in Bing Webmaster Tools. Google retired its old sitemap ping endpoint, so robots.txt and Search Console are the main paths. For Bing, also set up IndexNow to report changed URLs right away.
Does submitting a sitemap guarantee indexing?
No. Google calls a sitemap a hint and says discovered URLs may never be crawled or indexed. A sitemap helps search engines find pages. Whether a page gets indexed still depends on its quality, its canonical signals and how well your site links to it. Use the sitemap to find the gap between what you submit and what gets indexed.
More like this
SEO