# XML sitemaps

> For the complete documentation index, see [llms.txt](https://attensira.com/llms.txt).
> Every page on this site is also served as Markdown: append `.md` to any URL, or send `Accept: text/markdown`.

> An XML sitemap lists the URLs you want crawlers to find, with an honest last-modified date. The protocol limits, what Google ignores, and why AI tools read it.

- Canonical page: https://attensira.com/glossary/xml-sitemaps
- Family: glossary
- Last updated: 2026-10-04
- Author: Karl-Gustav Kallasmaa (https://attensira.com/about)
- Claims as data: https://attensira.com/claims.json?slug=xml-sitemaps

**In short:** An XML sitemap is a file listing the URLs you want search engines to discover, each with an optional last-modified date. It is a hint: listing a URL does not make it crawled or indexed. One file holds at most 50,000 URLs or 50 MB, and Google uses lastmod only when it is consistently accurate.

**Pull request example-co/website#214:** Drop two redirected URLs from the sitemap and stop re-stamping lastmod

```diff
# public/sitemap.xml
  <url><loc>https://example.com/pricing</loc><lastmod>2026-09-12</lastmod></url>
- <url><loc>https://example.com/old-pricing</loc><lastmod>2026-10-04</lastmod></url>
- <url><loc>https://example.com/blog?page=2</loc><lastmod>2026-10-04</lastmod></url>
- <url><loc>https://example.com/blog</loc><lastmod>2026-10-04</lastmod></url>
+ <url><loc>https://example.com/blog</loc><lastmod>2026-09-30</lastmod></url>
```

_Example: example pull request on an example site. Not a reading._

## Key facts

- Also known as: Sitemap, sitemap.xml; a sitemap index for many files
- What it is: A list of canonical URLs, each with an optional lastmod
- Limits per file: 50,000 URLs or 50 MB uncompressed
- Google reads: loc, and lastmod when accurate; ignores priority, changefreq
- Declared in: [A Sitemap: line in robots.txt](/glossary/robots-txt)
- In Attensira: [The fallback for page discovery, and a file the crew may edit](https://docs.attensira.com/traffic/pages)

A sitemap is a list of the URLs a site wants crawlers to know about. Search engines find most pages by following links; a sitemap covers the ones links miss and tells crawlers when something changed. It is one of the few things in SEO that is fully specified, and also one of the most commonly faked.

## How does an XML sitemap work?

The format comes from sitemaps.org. Each URL is a `<url>` with a `<loc>` and, optionally, a `<lastmod>`:

```xml
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://attensira.com/glossary/robots-txt</loc>
    <lastmod>2026-10-04</lastmod>
  </url>
</urlset>
```

One file holds at most 50,000 URLs or 50 MB uncompressed. Larger sites split into several files and publish a **sitemap index** that lists them. Crawlers learn where the sitemap is from a `Sitemap:` line in [robots.txt](/glossary/robots-txt), or from a submission in Google Search Console or Bing Webmaster Tools.

## What does Google actually use?

Google is explicit about it:

| Field | What Google does with it |
| --- | --- |
| loc | Discovers the URL |
| lastmod | Uses it if it is consistently and verifiably accurate |
| changefreq | Ignores it |
| priority | Ignores it |

And the whole file is "merely a hint". Google may not download it, and listing a URL does not get it crawled or indexed.

The lesson is about `lastmod`. A sitemap generator that stamps every URL with the time of the last build makes every page look changed every day. A crawler that learns the dates are noise stops using them, for the whole site.

## What does a real sitemap look like?

Here is how attensira.com builds its own. The `robots.txt` ends with `Sitemap: https://attensira.com/sitemap-index.xml`, and that index lists twelve files, /sitemap/0.xml to /sitemap/11.xml, one or more per content family: static pages, compare, features, tools, glossary, blog, guides, bots and the rest.

The dates come from git, not from the build clock. A script finds the last commit that touched the files that actually produce each page and writes that date. A page whose files have no history gets no `lastmod` at all, rather than a made-up one. A change to a shared template dates the family's index page, not every page under it, so one template fix does not re-stamp hundreds of URLs on the same day. There is no `changefreq` and no `priority`, because nobody reads them.

Pages from the content tree, like this one, are dated by their own last-updated field. This page's `lastmod` changes when its content changes, and at no other time.

## How does one site split its sitemap?

attensira.com's robots.txt points at one sitemap index, and the index lists twelve files, one per group of page families. Search Console then reports indexing per group, so a family Google is rejecting shows up on its own instead of inside one site-wide number.

**attensira.com/sitemap-index.xml · twelve files**

| File | Holds |
| --- | --- |
| /sitemap/0.xml | Static and legal pages |
| /sitemap/1.xml | Compare and alternatives |
| /sitemap/2.xml | Features and industries |
| /sitemap/3.xml | Platform visibility and tools |
| /sitemap/4.xml | Glossary, including this page |
| /sitemap/5.xml | Blog |
| /sitemap/6.xml | Guides and best-of lists |
| /sitemap/7.xml | Bots |
| /sitemap/8.xml to 11.xml | Data, MCP use cases, concepts, integrations |

_Source: attensira.com sitemap index, as the site's code builds it, as of 2026-10-04._

## Do sitemaps matter for AI search?

Indirectly. AI search engines find pages through their own crawlers and through search indexes such as Bing's and Google's, and those use sitemaps for discovery like any crawler. No AI operator documents a sitemap as a reason to cite a page. A sitemap gets a page found sooner; whether the answer uses it depends on what the page says.

Attensira reads sitemaps for a different reason. It keeps an inventory of every URL your site publishes, so the crew can reason about pages no engine has cited yet. A web reader maps the domain; when it is unavailable, the inventory falls back to `/sitemap.xml` or the sitemaps your `robots.txt` declares, and then a page missing from your sitemap is missing from the inventory too.

## What do people get wrong about sitemaps?

- **Listing URLs that are not canonical.** Redirects, parameters and `noindex` pages in a sitemap send mixed signals. List only the URL you want indexed.

- **Fake lastmod dates.** Stamping the build time on everything teaches crawlers to ignore the field.

- **Forgetting the robots.txt line.** A sitemap no crawler knows about does nothing.

- **Blocking the listed URLs in robots.txt.** A URL can be in the sitemap and disallowed at the same time; the disallow wins.

- **Treating submission as indexing.** It is a request to look, not a promise to keep.

## How can you check yours?

The free [XML sitemap validator](/tools/sitemap-validator) fetches a sitemap or index and checks it against the protocol: the namespace, the URL and size limits, `lastmod` formats, duplicates, URLs on another host, and whether `robots.txt` declares it. In a workspace, sitemaps at the root are among the files the crew's web engineer may change, and a fix arrives as a pull request like the one at the top of this page, waiting for your approval. That is the service of an SEO agency at the price of a tool.

## FAQ

### What is an XML sitemap?

A file, usually at /sitemap.xml, that lists the canonical URLs of a site in the format defined by sitemaps.org. Each entry has a loc and may carry a lastmod date. A sitemap index file lists other sitemap files, for sites too large for one.

### How many URLs can one sitemap hold?

50,000 URLs or 50 MB uncompressed, whichever comes first, under the sitemaps.org protocol. The same limits apply to a sitemap index file. Larger sites split their URLs across several sitemaps and list them in an index.

### Does a sitemap guarantee my pages get indexed?

No. Google calls submitting a sitemap merely a hint: it does not guarantee Google will download it or crawl the URLs in it. Pages still have to be reachable, allowed in robots.txt, and worth indexing.

### Do priority and changefreq matter?

Not to Google, which says it ignores both. It uses lastmod if the value is consistently and verifiably accurate. A lastmod stamped with today's date on every build teaches Google to distrust it.

### Do AI search engines use sitemaps?

Their crawlers are web crawlers, and Bing's index, which several AI products search, uses sitemaps like Google's does. None of the major AI operators documents sitemaps as a citation signal. A sitemap helps a page get found; it does nothing for whether an answer uses it.
