What is a sitemap
Also known as: XML sitemap, sitemap.xml
A sitemap is a file, almost always in XML, that lists a site's pages, videos and other files and provides details such as the last update date and alternate language versions. Search engines like Google read it to crawl the site more efficiently. A sitemap helps with discovery, but it does not guarantee the listed pages will be crawled or indexed.
Each page appears in the file in a block like this: <url><loc>https://example.com/services</loc><lastmod>2026-09-24</lastmod></url>
The loc holds the page's full URL, with https and domain. The lastmod holds the date of the last significant content change. A store, news site or glossary sitemap repeats this block for every page that should appear in search.
Who needs a sitemap
According to Google, a site whose pages are properly linked can usually be discovered almost entirely without a sitemap. Even so, in most cases a site benefits from having one.
| Needed? | Why | |
|---|---|---|
| Large site | Yes | It is hard to make sure every page has a link pointing to it |
| New site with few external links | Yes | The crawler may not find pages if nobody links to them |
| Lots of video, images or news | Yes | The sitemap carries extra information about those files |
| About 500 pages or fewer, well linked | Maybe not | The crawler finds everything by following links from the home page |
The rules Google enforces
- At most 50,000 URLs or 50 MB uncompressed per file. Beyond that, split into several sitemaps and create a sitemap index.
- UTF-8 encoding.
- Fully qualified, absolute URLs, with protocol and domain.
- Preferably at the site root, where it applies to every page.
- Only the pages you want in results: no noindex, redirected or broken pages.
lastmod, priority and changefreq
Google ignores the priority and changefreq fields, which many generators still fill in. It does use lastmod, as long as it is consistently and verifiably accurate, for example when it matches the page's last real change.
The date should reflect the last significant update: a change to the main content, structured data or links. Updating the copyright year does not count. A sitemap that stamps every page with today's date, every day, teaches Google not to trust the field.
How to tell Google
- Submit the sitemap URL in Search Console's sitemaps report, which also shows errors and discovered pages.
- Add a Sitemap line with the full URL to robots.txt; Google finds the file the next time it crawls robots.txt.
- Keep the file generated automatically by the site, so a new page enters the sitemap on the day it is published.
Common mistakes
- Listing pages that should not be on Google, such as cart, internal search or test pages.
- Leaving URLs that redirect or return 404 in the sitemap.
- Automatic lastmod with today's date on every page.
- A stale sitemap after a migration, pointing to old URLs.
- Thinking a sitemap replaces internal links. It helps discovery, but links remain the main path.
Frequently asked questions
What is a sitemap?
A file that lists a site's pages and files, with details such as the last update date, so search engines can crawl the site more efficiently.
Does every site need a sitemap?
Not necessarily. Google says small sites, about 500 pages or fewer and well linked internally, may not need one. But in most cases having one helps.
Does a sitemap guarantee indexing?
No. It helps Google discover pages, but crawling and indexing are still Google's decision.
What is the sitemap size limit?
50,000 URLs or 50 MB uncompressed per file. Larger sites use several sitemaps grouped in a sitemap index.
Does Google use sitemap priority?
No. Google ignores priority and changefreq. It uses lastmod when the date is consistent and reflects real changes to the page.
Related terms
- IndexingIndexing is the stage where Google analyzes the content of a page it has already crawled, works out what it...
- robots.txtRobots.txt is a text file at the root of a site that tells search engine crawlers which URLs they may or may...
- Canonical tagA canonical URL is the version Google picks as the main one when the same content exists at several...
- SERPSERP stands for search engine results page, the page a search engine shows after a query. On Google, it...
- Structured dataStructured data is a block of code, invisible to visitors, that describes a page's content in a standard...
- Core Web VitalsCore Web Vitals are three metrics that measure the real experience of people visiting a page: LCP, how long...
Rodrigo Fávaro
Founder of ROO3, a marketing and technology agency in São José do Rio Preto, Brazil. Builds AI products running in production (Tobia, gerar.app, Pense Mercado) and maintains the AI Benchmark, a public ranking of AI models.
X @rodmf LinkedIn rodrigofavaroMarketing you can measure, from the ad to the sale.
ROO3 builds and runs paid media, SEO and websites with real targets, dashboards and numbers. The first conversation is free.