
How does an XML sitemap work?
An XML sitemap works as a discovery hint: it hands search engines a list of URLs you consider important, so they do not depend only on links. Googlebot and Bingbot read the file, add new or changed URLs to the crawl queue and use the lastmod date to decide what to revisit. A sitemap does not guarantee crawling or indexing; Google calls it a hint.
A minimal sitemap with one URL looks like this:
- <?xml version=”1.0″ encoding=”UTF-8″?>
- <urlset xmlns=”http://www.sitemaps.org/schemas/sitemap/0.9″>
- <url><loc>https://example.com/de/kaffeemuehlen/</loc><lastmod>2026-10-01T09:00:00+00:00</lastmod></url>
- </urlset>
XML sitemap rules and limits
Google’s documentation sets a small number of hard rules that every sitemap must follow:
| Rule | Requirement |
|---|---|
| Size | Max 50,000 URLs or 50 MB uncompressed per file |
| Encoding | UTF-8 |
| URLs | Absolute, canonical, returning status 200 |
| Scope | Covers its own directory and below, unless submitted in Search Console |
| Sitemap index | Groups many sitemap files; Bing accepts up to 50,000 child sitemaps per index |
lastmod, changefreq and priority
Google ignores changefreq and priority, and Bing ignores them too. Google uses lastmod only when it is consistently accurate, meaning it changes after real edits to the main content, structured data or links, not after a new copyright year in the footer. Bing recommends the full ISO 8601 date with time and warns against setting lastmod to the moment the sitemap was generated.
Types of sitemaps
Besides standard page sitemaps, Google supports image, video and news extensions, plus RSS, Atom and plain text formats. News sitemaps matter for publishers in Google News; image sitemaps help stores with large product galleries.
Who needs an XML sitemap?
An XML sitemap is most useful for large, new or media-heavy sites. Google says a site of about 500 pages or fewer, with good internal linking, may not need one. In practice I add one to every project, because it costs nothing and gives a clean list of indexable URLs to compare with what Google actually indexed.
How to submit an XML sitemap
You submit a sitemap by adding it in Search Console or listing it in robots.txt:
- Add the sitemap URL in the Sitemaps report of Google Search Console and in Bing Webmaster Tools.
- Add a line Sitemap: https://example.com/sitemap_index.xml to robots.txt.
- Use IndexNow next to the sitemap for instant notifications to Bing and other participating engines.
The old Google ping URL no longer works: Google announced its deprecation on 26 June 2023 and switched it off by the end of that year.
XML sitemaps on multilingual and multi-country sites
An XML sitemap is one of 3 official places to declare hreflang, and on large international stores it is the one I prefer. Each url entry lists every language version, including itself, with xhtml:link elements, after the xhtml namespace is declared on the urlset:
- <xhtml:link rel=”alternate” hreflang=”pl-PL” href=”https://example.com/pl/mlynki/”/>
- <xhtml:link rel=”alternate” hreflang=”de-DE” href=”https://example.com/de/kaffeemuehlen/”/>
- <xhtml:link rel=”alternate” hreflang=”cs-CZ” href=”https://example.com/cz/mlynky/”/>
I also split sitemaps per market (sitemap-pl.xml, sitemap-de.xml, sitemap-cz.xml). Combined with a separate Search Console property for each folder, this shows indexing coverage per country in one glance. Sitemaps can also list URLs from several domains, such as ccTLDs, once you verify each one in Search Console. Include only canonical URLs, never redirected or noindexed ones.
Sitemaps and AI search
Bing wrote in July 2025 that sitemaps remain a foundational signal for content discovery in AI-powered search and that it revisits sitemaps at least once a day. Accurate lastmod dates help fresh pages reach Copilot answers faster, which matters for AI SEO.
Need a sitemap and hreflang setup for several countries? See my international SEO consultancy or order an SEO audit.
Frequently asked questions about XML sitemap
How many URLs can an XML sitemap contain?
One XML sitemap can contain up to 50,000 URLs or 50 MB uncompressed. Larger sites split URLs across several files and group them in a sitemap index.
Does Google use priority and changefreq?
No, Google ignores priority and changefreq. It uses lastmod only when the date is consistently accurate and reflects real content changes.
Does a sitemap guarantee indexing?
No, a sitemap is only a hint for discovery. Google still decides whether to crawl and index each URL based on quality and other signals.
Can I put hreflang in an XML sitemap?
Yes, Google accepts hreflang in XML sitemaps through xhtml:link elements. Each URL entry must list all language versions, including itself.
Related terms
- Build and submit a sitemap · Google Search Central
- What is a sitemap · Google Search Central
- Tell Google about localized versions of your page · Google Search Central
- Google to deprecate Sitemaps ping endpoint later this year · Search Engine Land
- Keeping Content Discoverable with Sitemaps in AI Powered Search · Bing Webmaster Blog
- Major search engines support Sitemaps protocol · John Battelle's Search Blog







