What Is an XML Sitemap?
An XML sitemap is a machine-readable list of a site's URLs, defined by sitemaps.org and read by search engines to find pages they might otherwise miss. The protocol's home page defines it this way: “Sitemaps are an easy way for webmasters to inform search engines about pages on their sites that are available for crawling. In its simplest form, a Sitemap is an XML file that lists URLs for a site along with additional metadata about each URL …” (sitemaps.org).
Google's definition, in Learn about sitemaps, is broader: “A sitemap is a file where you provide information about the pages, videos, and other files on your site, and the relationships between them. Search engines like Google read this file to crawl your site more efficiently.” Google adds that a sitemap “tells search engines which pages and files you think are important in your site”, and can carry details such as when a page was last updated and its alternate language versions.
Both sources describe a sitemap as a supplement to links, not a replacement. sitemaps.org says crawlers “usually discover pages from links within the site and from other sites,” and that sitemaps “supplement this data.” If you use a CMS such as WordPress, Wix or Blogger, Google says it is “likely that your CMS has already made a sitemap available to search engines and you don't have to do anything.”
Where the XML Sitemap Comes From: the Sitemaps Protocol
The XML sitemap format comes from the Sitemaps protocol, which Google's Search Central blog says “was introduced in 2005” and “hasn't changed for over 15 years” (Google, June 2023). The current version, Sitemap 0.90, is published at sitemaps.org under a Creative Commons Attribution-ShareAlike licence, and the site says it “has wide adoption, including support from Google, Yahoo!, and Microsoft.”
The protocol is short. It sets the XML structure, the required and optional tags, size limits, file location rules, the sitemap index format, and how to tell search engines where the file is. The sitemaps.org home page also says what a sitemap cannot promise: “Using the Sitemap protocol does not guarantee that web pages are included in search engines, but provides hints for web crawlers to do a better job of crawling your site.” Each search engine then documents how much of the protocol it uses; the protocol itself notes that “Support for these optional tags may vary among search engines.”
The Tags and Rules of an XML Sitemap
An XML sitemap needs only three elements: a <urlset> wrapper with the protocol namespace, a <url> entry per page and a <loc> inside each. sitemaps.org lists everything else as optional, and Google and Bing now ignore two of the three optional tags. A minimal valid file:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/guide</loc>
<lastmod>2026-10-07</lastmod>
</url>
</urlset>
| Tag | Protocol status | What sitemaps.org says | Google and Bing |
|---|---|---|---|
<urlset> | Required | “Encapsulates the file and references the current protocol standard.” | Required |
<url> | Required | Parent tag for each URL entry | Required |
<loc> | Required | “URL of the page”; must begin with the protocol and be “less than 2,048 characters” | Google: use “fully-qualified, absolute URLs” |
<lastmod> | Optional | The page's last modification date in W3C Datetime format, “not when the sitemap is generated” | Google uses it if “consistently and verifiably” accurate; Bing calls it “a key signal” |
<changefreq> | Optional | “considered a hint and not a command” | Google: ignored. Bing: ignored |
<priority> | Optional | 0.0 to 1.0, default 0.5; “not likely to influence the position of your URLs” in results | Google: ignored. Bing: ignored |
Four more rules from the protocol catch people out. The file must be UTF-8 encoded and all data values entity-escaped, so & in a URL becomes &. All URLs must come from a single host. A sitemap at /catalog/sitemap.xml can only list URLs under /catalog/, which is why sitemaps.org says it is “strongly recommended” to place the sitemap in the root directory; Google says this restriction does not apply to sitemaps submitted through Search Console (Google, Build and submit a sitemap). And the namespace URI begins http://, not https://, which Google says “is working as intended.”
XML Sitemap Limits and Sitemap Index Files
Each XML sitemap may hold no more than 50,000 URLs and be no larger than 50MB (52,428,800 bytes) uncompressed, according to sitemaps.org; gzip compression is allowed, but the limit applies to the uncompressed file. Google applies the same limits to all sitemap formats. Sites above either limit split their URLs across several sitemaps and list them in a sitemap index.
A sitemap index is a sitemap of sitemaps. Its root element is <sitemapindex>, with a <sitemap> and <loc> for each child file. sitemaps.org says an index may list up to 50,000 sitemaps, must stay under 50MB, and can list only sitemaps “found on the same site as the Sitemap index file.” Google adds that the referenced sitemaps “must be in the same directory as the sitemap index file, or lower in the site hierarchy”, and that you can submit up to 500 sitemap index files per site in Search Console (Google, Manage your sitemaps with a sitemap index file). Bing says it supports up to 50,000 child sitemaps in an index (Bing Webmaster blog, July 2025).
In an index, <lastmod> means something different. sitemaps.org says it “Identifies the time that the corresponding Sitemap file was modified. It does not correspond to the time that any of the pages listed in that Sitemap were changed,” and lets crawlers fetch only the sitemaps that changed.
How Google Uses lastmod
Google uses lastmod to schedule recrawls of URLs it already knows, but only when the dates are trustworthy. In its June 2023 post, Google said that “nowadays lastmod is indeed useful in many cases and we're using it as a signal for scheduling crawls to URLs that we previously discovered” (Google Search Central blog).
The same post sets two conditions. The date must be in a supported format, and “it needs to consistently match reality: if your page changed 7 years ago, but you're telling us in the lastmod element that it changed yesterday, eventually we're not going to believe you anymore when it comes to the last modified date of your pages.” Google means “last significant modification”: changing the main text, structured data or links counts; a sidebar or footer tweak does not. Its current documentation gives the same examples and adds that updating the copyright date is not significant (Google). Google also says it is “fine to leave out lastmod” for pages whose change date your software cannot tell, such as a homepage that aggregates other pages.
Bing takes the same line. Its July 2025 post calls lastmod “a key signal”, recommends ISO 8601 dates with a time, and warns: “Avoid setting lastmod to the time your sitemap was generated unless the content on that URL was actually updated.”
Who Needs an XML Sitemap, According to Google
Google says most well-linked small sites can do without a sitemap, but that “in most cases, your site will benefit from having a sitemap.” Its Learn about sitemaps page explains: “If your site's pages are properly linked, Google can usually discover most of your site,” while a sitemap “can improve the crawling of larger or more complex sites, or more specialized files.”
| Google says you might need a sitemap if… | Google says you might not need one if… |
|---|---|
| Your site is large, so it is harder to make sure every page is linked from another page | Your site is “small”: “about 500 pages or fewer”, counting only pages that need to be in search results |
| Your site is new and has few external links, so Googlebot might not discover your pages | Your site is “comprehensively linked internally”, so Googlebot can find every important page from the home page |
| Your site has a lot of rich media (video, images) or is shown in Google News | You don't have many media files or news pages you want shown in search results |
Google's SEO Starter Guide puts it more plainly for small businesses: submitting a sitemap “isn't required, and you should first focus on making sure people know about your site” (Google SEO Starter Guide).
What an XML Sitemap Does Not Do
An XML sitemap is a request for attention, not an instruction, and both its defining document and Google say so. Google's build guide states that “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.” The limits, by source:
- It does not guarantee indexing. Google: a sitemap “doesn't guarantee that all the items in your sitemap will be crawled and indexed.”
- It does not keep pages out. sitemaps.org: to tell search engines about content you do not want indexed, “use a robots.txt file or robots meta tag.” Leaving a URL out of a sitemap does not hide it.
- It does not rank pages.
priorityis relative to your own URLs only, and Google and Bing ignore it. - It is only a weak canonical signal. Google says URLs listed in a sitemap are “suggested as canonicals”, but sitemap inclusion is a “Less powerful signal to Google than the
rel="canonical"mapping technique” (Google). See what a canonical URL is. - It cannot be pinged any more. The protocol still describes an HTTP “ping” submission, but Google deprecated its endpoint in 2023 and says requests to it “will result in a 404 error.”
Image, Video and News Sitemap Extensions
Google supports three sitemap extensions that add tags in their own XML namespaces, and the sitemaps.org protocol allows such extensions. Google says the image, video and news versions are “based on generic sitemaps”, so the general rules still apply, and that you can either add their tags to an existing sitemap or keep a separate file.
| Extension | Namespace | What it adds | Google's key rules |
|---|---|---|---|
| Image | http://www.google.com/schemas/sitemap-image/1.1 | Image URLs on a page, “especially those that we might not otherwise find” | Up to 1,000 <image:image> tags per <url>; caption, title, geo location and licence tags removed from Google's documentation |
| Video | http://www.google.com/schemas/sitemap-video/1.1 | Video title, description, thumbnail and player or content location | Files must be accessible to Googlebot; don't list videos unrelated to the host page; Google also supports mRSS feeds |
| News | http://www.google.com/schemas/sitemap-news/0.9 | Publication name, language, publication date and title | Include only articles “created in the last two days”; up to 1,000 <news:news> tags per sitemap |
Google's build guide also lists localized versions of pages (hreflang annotations) as information an XML sitemap can carry.
Maximum number of entries allowed, as documented October 2026
Source: sitemaps.org, Sitemaps XML format (protocol 0.90); Google Search Central, News sitemaps and Image sitemaps.
Sitemap and index files are also capped at 50MB (52,428,800 bytes) uncompressed. The image limit applies to each <url> entry, not to the whole file.
XML Sitemap vs HTML Sitemap and Other Formats
An XML sitemap is written for crawlers; an HTML sitemap is an ordinary web page of links written for people. Google's build guide lists the sitemap formats it accepts, XML, RSS, mRSS, Atom 1.0 and plain text, and an HTML page is not among them. An HTML sitemap can still help discovery the way any internal link does: Google says important pages should be reachable “through some form of navigation, be that your site's menu or links that you placed on pages.”
| Format | Who reads it | What it can carry | Google's note |
|---|---|---|---|
| XML sitemap | Crawlers | URLs, lastmod, image, video, news and localized-version data | “the most versatile of the supported formats” |
| RSS, mRSS or Atom 1.0 feed | Crawlers and feed readers | Recent URLs and dates; video via mRSS | Easy because CMSes generate feeds, but covers only recent URLs |
| Text file | Crawlers | URLs only, one per line, UTF-8 | “The simplest of sitemap formats” |
| HTML sitemap page | Visitors, and crawlers as normal links | Links and anchor text | Not a sitemap format in Google's list; works as internal linking |
| IndexNow | Participating engines (Bing and others, not Google) | Individual changed URLs, pushed as they change | Bing recommends it alongside, not instead of, a sitemap |
How Search Engines Find an XML Sitemap
Search engines find a sitemap through a Sitemap: line in robots.txt or a submission in their webmaster tools. sitemaps.org lists both, plus the now-retired HTTP ping. Google says “Google, Bing, and other major search engines support the sitemap field in robots.txt”, that its value “must be a fully qualified URL”, that it “isn't tied to any specific user agent”, and that there is “no limit to the number of sitemaps” you can list (Google robots.txt specification).
User-agent: *
Disallow:
Sitemap: https://example.com/sitemap.xml
If you have a sitemap index, sitemaps.org says you can list just the index. Submitting through Google Search Console or Bing Webmaster Tools adds status reports and error details; our guide on how to submit a sitemap to Google and Bing covers both. For changes that should reach Bing quickly, see how to set up IndexNow. Whether AI crawlers use sitemaps is less documented; our report Do AI crawlers read your sitemap? found that of eight crawler operators whose documentation we read, only Common Crawl states that it uses them.
Common Misconceptions About XML Sitemaps
| Myth | What the source actually says | Source |
|---|---|---|
| “Pages in my sitemap will be indexed.” | A sitemap “doesn't guarantee that all the items in your sitemap will be crawled and indexed.” | |
| “Setting priority to 1.0 helps ranking.” | Priority is “not likely to influence the position of your URLs”; Google ignores it; Bing ignores it | sitemaps.org; Google; Bing |
| “Set lastmod to today on every page to get recrawled.” | If dates don't match reality, “eventually we're not going to believe you anymore” | Google, 2023 |
| “Every site needs a sitemap.” | A well-linked site of “about 500 pages or fewer” might not need one | |
| “Leaving a page out of the sitemap keeps it out of search.” | To exclude content, “use a robots.txt file or robots meta tag” | sitemaps.org |
| “Ping Google after every update.” | The ping endpoint is deprecated; requests “will result in a 404 error” | Google, 2023 |
How to Check Your XML Sitemap
Checking a sitemap means confirming it exists, is valid and lists only the URLs you want found. Most of this takes a browser and a few minutes.
- Find it. Open
https://yourdomain/robots.txtand look for aSitemap:line; if there is none, try/sitemap.xmlor your CMS's documented location. - Open it. It should load as XML with a 200 status, start with
<urlset>or<sitemapindex>, and use absolute URLs. - Check the URLs. List only canonical pages that return 200, in one consistent form (https, with or without trailing slash, with or without
.html), matching each page'srel="canonical". - Check the dates.
lastmodshould change only when the page meaningfully changes, not every time the file is regenerated. - Check the limits. Under 50,000 URLs and 50MB uncompressed per file, or use an index.
- Check the reports. In Google Search Console's Sitemaps report and Bing Webmaster Tools, confirm the file was read without errors. To check a single URL, see how to check if a page is indexed by Google.
Frequently Asked Questions
Is a sitemap.xml file required for SEO?
No. Google says a sitemap is not required and that a small, well-linked site may not need one, though “in most cases, your site will benefit from having a sitemap.”
How many URLs can an XML sitemap contain?
Up to 50,000 URLs, and no more than 50MB (52,428,800 bytes) uncompressed. Above that, split the URLs into several sitemaps and list them in a sitemap index.
Where should an XML sitemap be placed?
At the site root, which sitemaps.org strongly recommends, because a sitemap can only cover URLs in its own directory and below. Google lifts that restriction for sitemaps submitted in Search Console.
Does Google use changefreq and priority?
No. Google says it ignores <priority> and <changefreq>, and Bing says both are ignored and do not influence crawling or ranking.
Should lastmod include a time?
sitemaps.org allows a date alone (YYYY-MM-DD) in W3C Datetime format. Bing recommends ISO 8601 with both date and time. Either way, the value should be the page's last significant change.
Can one sitemap list URLs from several domains?
Not under the base protocol, which requires a single host. Google accepts one sitemap with URLs from several sites if you verify every site in Search Console; with the robots.txt method, each site still gets its own sitemap, though all can be hosted in one location.
Can I use an RSS feed as a sitemap?
Yes. Google accepts RSS 2.0 and Atom 1.0 feeds as sitemaps, but notes that a feed usually provides information only on recent URLs.
Should noindex or redirected pages be in my sitemap?
No. Google says to include the URLs you want to see in search results, and treats sitemap URLs as suggested canonicals, so redirected, error and noindex URLs send conflicting signals.
Do I still need a sitemap if I use IndexNow?
Bing recommends both: a complete XML sitemap for coverage and IndexNow for real-time changes. IndexNow does not reach Google.
Sources and Methodology
This explainer is built from the Sitemaps protocol at sitemaps.org, Google Search Central documentation and blog, and the Bing Webmaster blog, all read on October 7, 2026. Definitions and limits are quoted verbatim from the defining documents. Google's statements on lastmod and the ping endpoint come from a June 2023 blog post, which its current documentation repeats. Bing's statements come from a July 2025 blog post; we did not re-read Bing's JavaScript-rendered help pages for this explainer. We did not run crawl or indexing tests. The AI-crawler finding is from our own earlier report, linked above.
- official sitemaps.org, What are Sitemaps?, last updated 17 April 2020. Read October 7, 2026.
- official sitemaps.org, Sitemaps XML format (protocol 0.90). Read October 7, 2026.
- official Google Search Central, Learn about sitemaps. Read October 7, 2026.
- official Google Search Central, Build and submit a sitemap. Read October 7, 2026.
- official Google Search Central, Manage your sitemaps with a sitemap index file. Read October 7, 2026.
- official Google Search Central, Image sitemaps, Video sitemaps and alternatives and News sitemaps. Read October 7, 2026.
- official Google Search Central Blog, Sitemaps ping endpoint is going away, June 26, 2023. Read October 7, 2026.
- official Google, How Google interprets the robots.txt specification. Read October 7, 2026.
- official Google Search Central, How to specify a canonical with rel="canonical" and other methods. Read October 7, 2026.
- official Google Search Central, SEO Starter Guide. Read October 7, 2026.
- official Bing Webmaster Blog, Keeping Content Discoverable with Sitemaps in AI Powered Search, July 2025. Read October 7, 2026.