Home/SEO Guide/Reference/XML sitemaps
Reference article · 14 sources · last reviewed 1 Oct 2026

XML sitemaps

PRACTICAL GUIDEPrefer diagrams and quick fixes? The XML sitemaps guide covers this visually.Open the guide →

An XML sitemap is a file that lists the URLs on a website that the owner wants search engines to crawl, with optional details such as when each page last changed [1][2]. The format is defined by the open Sitemaps protocol at sitemaps.org and is supported by Google, Bing and other search engines [1][14]. A sitemap is a hint: it helps discovery but does not guarantee that listed pages will be crawled or indexed [2].

IN SHORT
  • Sitemaps help most on large or new sites, and sites with weak internal linking [2].
  • A file holds up to 50,000 URLs or 50 MB uncompressed; bigger sites use a sitemap index [1][4].
  • Google uses loc and lastmod, and ignores priority and changefreq [3].
  • List only canonical, indexable URLs that return 200 [3][12].

1Overview

Search engines find most pages through links. A sitemap gives them a second route: a list of URLs the site owner considers important, which can include pages that are new, poorly linked or deep in the site [2].

Google says a sitemap is most useful for sites that are large, new with few external links, have many pages not well linked to each other, or have a lot of rich media or news content. A small site with good internal links may not need one [2].

KEY FACTUsing a sitemap doesn’t guarantee that every listed URL will be crawled or indexed [2].

2History

The Sitemaps protocol began as a Google format and was published at sitemaps.org as version 0.90 under a Creative Commons licence, after which it was adopted by other major search engines [1]. Later additions included the Sitemap: line in robots.txt for automatic discovery [1].

In June 2023 Google retired its sitemap “ping” endpoint, saying most pings it received were not useful, and confirmed it would use <lastmod> only when it is consistently accurate [5].

3Supported formats

FormatNotes
XML sitemapThe most versatile; supports extensions for images, video, news and hreflang [3]
RSS, mRSS or Atom feedUseful when a CMS already publishes a feed; usually lists recent URLs only [3]
Plain text fileOne URL per line; no extra metadata [3]

4XML structure

An XML sitemap has a <urlset> root element with the sitemaps.org namespace, and one <url> block per page [1].

TagRequiredMeaningUsed by Google
locYesAbsolute URL of the page [1]Yes [3]
lastmodNoLast modification date, in W3C Datetime format [1][13]Yes, if accurate [3][5]
changefreqNoHow often the page is likely to change [1]No [3]
priorityNoRelative priority, 0.0–1.0, default 0.5 [1]No [3]

Files must be UTF-8 encoded, and characters such as & in URLs must be entity-escaped [1].

5Size limits and index files

Each sitemap file may contain at most 50,000 URLs and be no larger than 50 MB uncompressed; files may be gzip-compressed for transfer [1][3].

Larger sites split their URLs across several sitemaps and list them in a sitemap index file, which uses a <sitemapindex> root and the same limits. The index can be submitted once instead of each file [1][4].

Splitting by content type, products, categories, articles, has a practical benefit: reports per file show which part of the site has indexing problems.

6Location and submission

Google recommends placing the sitemap at the site root. A sitemap generally affects only URLs in the directory it is placed in and below [3].

  • Submit it in Search Console’s Sitemaps report, which shows when it was last read and any errors [6].
  • Add a Sitemap: line to robots.txt so any crawler can find it; the line can appear more than once and is independent of user-agent groups [11].
  • Since the 2023 ping retirement, Google relies on these two methods and on recrawling known sitemaps [5].

7Extensions

Google supports sitemap extensions that add information about specific content types [3]:

  • Image: lists images on each page, helping Google find images it might not otherwise discover [7].
  • Video: describes video content such as title, thumbnail and duration [8].
  • News, for publishers in Google News, listing recently published articles [9].
  • hreflang: declares localised alternates for each URL, as an alternative to HTML tags [10].

8What to include

Google asks for the full, absolute URLs of the pages you want shown in search: the canonical versions [3]. Listing a URL in a sitemap is a weak canonicalisation signal, so it should agree with redirects and rel="canonical"[12].

Based on [3] and [12].
IncludeLeave out
Canonical URLs returning 200URLs that redirect
Pages you want in search resultsnoindex pages
Accurate lastmod datesNon-canonical duplicates and parameter URLs
URLs on the same host and protocolURLs blocked by robots.txt or returning errors

9Common misconceptions

BeliefWhat the sources say
Priority tells Google which pages matter mostGoogle ignores priority [3]
Every listed URL will be indexedA sitemap is a hint only [2]
Updating lastmod on every build helpsGoogle uses lastmod only when it is consistently accurate [5]
Pinging Google after each update is requiredThe ping endpoint was retired in 2023 [5]

See also

References

  1. [1]“Sitemaps XML format”. sitemaps.org. www.sitemaps.org/protocol.html
  2. [2]“Learn about sitemaps”. Google Search Central. developers.google.com/search/docs/crawling-indexing/sitemaps/overview
  3. [3]“Build and submit a sitemap”. Google Search Central. developers.google.com/search/docs/crawling-indexing/sitemaps/build-sitemap
  4. [4]“Manage your sitemaps using a sitemap index file”. Google Search Central. developers.google.com/search/docs/crawling-indexing/sitemaps/large-sitemaps
  5. [5]“Sitemaps ping endpoint is going away”. Google Search Central Blog, June 2023. developers.google.com/search/blog/2023/06/sitemaps-lastmod-ping
  6. [6]“Manage sitemaps with the Sitemaps report”. Search Console Help. support.google.com/webmasters/answer/7451001
  7. [7]“Image sitemaps”. Google Search Central. developers.google.com/search/docs/crawling-indexing/sitemaps/image-sitemaps
  8. [8]“Video sitemaps and alternatives”. Google Search Central. developers.google.com/search/docs/crawling-indexing/sitemaps/video-sitemaps
  9. [9]“Create a News sitemap”. Google Search Central. developers.google.com/search/docs/crawling-indexing/sitemaps/news-sitemap
  10. [10]“Tell Google about localized versions of your page”. Google Search Central. developers.google.com/search/docs/specialty/international/localized-versions
  11. [11]“How Google interprets the robots.txt specification”. Google Search Central. developers.google.com/search/docs/crawling-indexing/robots/robots_txt
  12. [12]“How to specify a canonical URL with rel="canonical" and other methods”. Google Search Central. developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls
  13. [13]“Date and Time Formats (W3C Datetime)”. W3C Note, 1997. www.w3.org/TR/NOTE-datetime
  14. [14]“Bing Webmaster Guidelines”. Microsoft Bing. www.bing.com/webmasters/help/webmaster-guidelines-30fba23a
CITE THIS ARTICLEKalenux. (2026). XML sitemaps. In Kalenux SEO Guide. Last reviewed 1 Oct 2026. https://kalenux.com.tr/reference/xml-sitemaps