Google sitemap rules

Google sitemap rules,
as documented

The sitemap limits, formats and tags Google documents, in Google's own words. Verified from Google's pages on 2026-10-07.

Google describes a sitemap as a file where you provide information about the pages, videos, and other files on your site, and the relationships between them. This page lists the rules Google documents for building and submitting one, with the wording taken from Google's pages.

The rules Google documents

TopicWhat Google saysSource
Size and URL limit “All formats limit a single sitemap to 50MB (uncompressed) or 50,000 URLs.”Google: if you have a larger file or more URLs, you must break your sitemap into multiple sitemaps. Google docs
Verified 2026-10-07
Supported formats “The XML sitemap format is the most versatile of the supported formats.”Google documents XML, RSS/mRSS/Atom 1.0 and text sitemaps. It accepts RSS 2.0 and Atom 1.0 feeds, and an mRSS feed for video details. Google docs
Verified 2026-10-07
Text sitemap “Don't put anything other than URLs in the sitemap file.”Google: a text sitemap has one URL per line and any name, provided it has a .txt extension. Google docs
Verified 2026-10-07
Encoding “The sitemap file must be UTF-8 encoded.” Google docs
Verified 2026-10-07
URL form “Use fully-qualified, absolute URLs in your sitemaps.”Google: it will attempt to crawl your URLs exactly as listed, so use https://www.example.com/mypage.html, not /mypage.html. Google docs
Verified 2026-10-07
Which URLs to list “Include the URLs in your sitemap that you want to see in Google's search results.”Google: it generally shows the canonical URLs in its search results, which you can influence with sitemaps. Google docs
Verified 2026-10-07
Location “A sitemap affects only descendants of the parent directory, unless you submit it through Search Console.”Google: a sitemap posted at the site root can affect all files on the site, which is where it recommends posting sitemaps. Google docs
Verified 2026-10-07
priority and changefreq “Google ignores <priority> and <changefreq> values.” Google docs
Verified 2026-10-07
lastmod “Google uses the <lastmod> value if it's consistently and verifiably (for example by comparing to the last modification of the page) accurate.”Google: it should reflect the date and time of the last significant update to the page. A change to the main content, structured data or links is generally significant; a change to the copyright date is not. Google docs
Verified 2026-10-07
Sitemap index “You can optionally create a sitemap index file and submit that single index file to Google. You can submit multiple sitemaps and sitemap index files to Google.”Google: this may be useful if you want to track the search performance of each individual sitemap in Search Console. Google docs
Verified 2026-10-07
Submitting “Submitting a sitemap is merely a hint: it doesn't guarantee that Google will download the sitemap or use the sitemap for crawling URLs on the site.”Google lists three ways: the Sitemaps report in Search Console, the Search Console API, or a Sitemap line in robots.txt. Google docs
Verified 2026-10-07
robots.txt line “Insert the following line anywhere in your robots.txt file, specifying the path to your sitemap.”Google: you can specify multiple sitemap lines, and there's no limit to the number of sitemaps you can include in your robots.txt file. Google docs
Verified 2026-10-07
Extensions “Using the Google supported sitemap extensions, you can also provide additional information about your images, video, and news content, as well as the localized versions of your pages.”Per Google's sitemap overview page: a video entry can specify running time, rating and age-appropriateness rating; an image entry can include the location of the images on a page; a news entry can include the article title and publication date. Google docs
Verified 2026-10-07

Read on 2026-10-07. Google's build-a-sitemap page showed "Last updated 2026-07-08 UTC" and its overview page showed "Last updated 2025-12-10 UTC". Notes under a quote are close paraphrases of the same page. Other search engines may treat sitemaps differently; this page covers only what Google documents.

Examples

The Sitemap line is Google's own example (it can go anywhere in the file); the User-agent lines are a generic illustration.

User-agent: *
Allow: /

Sitemap: https://example.com/my_sitemap.xml

Google's own basic XML sitemap, with a single URL and its lastmod.

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://www.example.com/foo.html</loc>
    <lastmod>2022-06-04</lastmod>
  </url>
</urlset>

A text sitemap, one URL per line and nothing else, saved with a .txt extension such as sitemap.txt.

https://www.example.com/file1.html
https://www.example.com/file2.html

Build a valid file with the free sitemap generator, check pasted XML with the XML sitemap validator, compare two versions with the sitemap diff checker, write the robots.txt line with the robots.txt generator, then check the live files with the robots.txt and sitemap checker. For related rules, see Google's robots meta tag directives and Google's hreflang rules (hreflang can also be set in a sitemap).

Rules to remember

  • Google says a single sitemap is limited to 50MB (uncompressed) or 50,000 URLs, and the file must be UTF-8 encoded.
  • Google says it ignores priority and changefreq.
  • Google says submitting a sitemap is merely a hint, not a guarantee of crawling.

The robots.txt Sitemap line and the rest of the file: Google robots.txt rules.

Google's guide to crawl budget on large sites: Google crawl budget.

Video sitemaps and watch pages: Google video SEO best practices.

Reading the numbers in Search Console: Search Console performance report definitions.

Questions

Does Google use priority or changefreq?

No. Google says it ignores <priority> and <changefreq> values. It uses <lastmod> only if it is consistently and verifiably accurate.

How big can one sitemap be?

Google says all formats limit a single sitemap to 50MB (uncompressed) or 50,000 URLs. Beyond that, split it into several sitemaps and optionally list them in a sitemap index file.

Does submitting a sitemap get my pages indexed?

Not by itself. Google says submitting a sitemap is merely a hint, and its overview says a sitemap helps search engines discover URLs but doesn't guarantee that all the items in it will be crawled and indexed.

Do I need a sitemap at all?

Google's overview says you might not need one if your site is small (about 500 pages or fewer that you want in search results) and comprehensively linked internally, and you don't have many media files or news pages to show in search. It says you might need one if your site is large, is new with few external links, or has a lot of rich media or is shown in Google News. It adds that in most cases a site will benefit from having one.

Can I use my RSS or Atom feed as a sitemap?

Google says yes: if your CMS generates an RSS or Atom feed, you can submit the feed's URL as a sitemap. It warns that such a feed only provides information on recent URLs.

Where should the sitemap file live?

Google recommends the site root, because a sitemap affects only descendants of its parent directory unless you submit it through Search Console.

How current is this page?

Every row was read from Google's pages on 2026-10-07. The build-a-sitemap page showed a last-updated date of 2026-07-08 UTC and the overview page showed 2025-12-10 UTC. Google can change its documentation, so treat the linked pages as the final word.

Sources

Let Balzac write the articles.

Type your website. Balzac finds the searches you can win, writes articles built to rank on Google and get cited by ChatGPT, and publishes them for you.

3 free articles · No card needed