XML sitemaps: what Google reads, and what it ignores
An XML sitemap is a file listing a site's addresses for search engines, with optional details such as each page's last change. Google says it "helps search engines discover URLs on your site, but it doesn't guarantee that all the items in your sitemap will be crawled and indexed." It is the on-page signal describing a whole site.
What a sitemap is
A sitemap is a file in which a site tells search engines what pages and files it has. Google's overview, last updated on and checked on , defines it as "a file where you provide information about the pages, videos, and other files on your site, and the relationships between them," which search engines read "to crawl your site more efficiently."
The common format is XML, set out in the protocol at sitemaps.org. Its basic example, quoted as given:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://www.example.com/</loc>
<lastmod>2005-01-01</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
</urlset>Each <url> entry holds one address in <loc>; the other tags are optional. An HTML page listing a site's pages for readers is sometimes also called a sitemap, but it is a different thing with a different reader.
Do you need one
Many sites can do without one, and many get one automatically. Google says: "If your site's pages are properly linked, Google can usually discover most of your site." It also notes that sites on a content system such as WordPress, Wix or Blogger likely already have a sitemap the system made available.
Google lists the cases where a sitemap helps most: a large site, where some pages are likely not linked from anywhere; a new site with few links from other sites; and a site with a lot of video, images or news content. Even then, a sitemap supports good internal links rather than replacing them.
What Google reads, and what it ignores
Google reads the address of each entry and, if it is trustworthy, the date of the last change. Its guide to building a sitemap, last updated on , is direct about the rest: "Google ignores <priority> and <changefreq> values."
The date is conditional. "Google uses the <lastmod> value if it's consistently and verifiably… accurate," for example when it matches the page's own last modification. The same guide says what counts as a change: "an update to the main content, the structured data, or links on the page is generally considered significant, however an update to the copyright date is not."
That rules out the common shortcut of stamping every entry with today's date on each build. A <lastmod> that changes when nothing on the page has changed teaches Google to ignore it.
Limits and format
One sitemap file has a size limit, and larger sites split it. Google states: "All formats limit a single sitemap to 50MB (uncompressed) or 50,000 URLs." The sitemaps.org protocol gives the same figures, 50,000 URLs and 50 MB (52,428,800 bytes). A site that needs more lists several sitemap files in a sitemap index, a small file that points to the others.
Addresses must be complete. Google asks you to "use fully-qualified, absolute URLs in your sitemaps," so https://example.com/page/, not /page/. List only the canonical version of each page, the address you want shown in results.
A sitemap can carry more than addresses: alternate language versions of a page can be declared in it, as covered under hreflang implementation.
Common sitemap mistakes
Listing addresses that redirect or fail
A sitemap should list the final, working address of each page, not old addresses that redirect or pages that return errors of any kind.
Listing non-canonical versions
Parameter variants, print versions and duplicates belong under their canonical address, not as entries of their own.
Dates that move on every build
As above, a
<lastmod>that changes without a real change is a date Google learns to ignore.A sitemap nobody updates
A file generated once and left alone misses every page added since. Generate it from the same source as the site, so it changes when the pages do, and only then.
Listing pages blocked from search
Pages you have deliberately kept out of search results do not belong in a list meant to help search engines find pages; the sitemap and the page then say opposite things.
Relying on it instead of links
A page listed only in the sitemap, with no links from the site, is still hard for readers to reach and gives search engines no sense of where it belongs.
Telling search engines where it is
A search engine has to find the sitemap before it can read it. Google describes two ways: submitting it in Search Console, and adding a Sitemap: line with the sitemap's full address to the site's robots.txt file, which crawlers read anyway. Notifying engines that support IndexNow about individual changed pages is a separate mechanism, which complements a sitemap rather than replacing it.
How this site does it
This site publishes a sitemap index at /sitemap.xml that points to one file per section. Each entry's <lastmod> is the date the page's text last changed in its source, not the date of the build, so a change to an author line or a template does not move it. That follows the rule Google sets out above.
FAQ
What is an XML sitemap?
An XML sitemap is a file listing the addresses on a site for search engines, with optional details such as the date each page last changed. Google describes it as a file with information about the pages and files on a site, which helps it crawl the site more efficiently. It does not guarantee indexing.
Do I need an XML sitemap?
Not always. Google says it can usually discover most of a properly linked site on its own, and many content systems create a sitemap automatically. A sitemap helps most on large sites, new sites with few external links, and sites with much video, image or news content.
Does Google use priority and changefreq?
No. Google's documentation states that it ignores the priority and changefreq values. It uses lastmod only when the dates are consistently and verifiably accurate, for example when they match real changes to the main content, structured data or links, not a copyright year.
How big can a sitemap be?
A single sitemap file can contain at most 50,000 URLs and be at most 50 MB uncompressed, according to both Google and the sitemaps.org protocol. A larger site splits its addresses across several files and lists them in a sitemap index file.