Skip to content

What an XML Sitemap Is and What It Is For

Up to date as of 1 December 2026

A sitemap is a list of the pages on your website, saved as a file that search engines can read. Think of the contents page at the front of a book. It doesn't change the book. It just shows what's inside and where to find it.1

What goes in the file

Google describes a sitemap as a file where you give information about the pages, videos and other "files on your site, and the relationships between them". Search engines read it to crawl your site more efficiently.1

"Crawl" is the trade word for a search engine's program visiting pages and following links. The program is called a crawler.

The most common format is XML, a plain text style where each item sits inside tags. Google also supports other formats defined by the sitemaps.org protocol.2

A tiny example: a bakery's sitemap might list the home page, the menu page and the contact page, one after another. That's all. No design, no pictures.

How a sitemap helps a search engineYou list your pages in a fileThe file sits on your websiteA search engine reads the listIt visits the pages it chooses
The sitemap is a list. The search engine still decides what to do with it.

What a sitemap can't do

It doesn't force a search engine to show anything. Google says a sitemap helps search engines discover URLs, but it doesn't guarantee that every item in it will be crawled and indexed.1

"Indexed" means the search engine has stored the page so it can appear in results.

So treat it as a helpful hint, not a switch.

Which pages belong in it

List the pages you want people to find in search. Google's advice is to include the URLs you want to see in its search results.2

A URL is just a page's web address. Every address in one sitemap must come from a single host, such as www.example.com.3

Pages that only staff use, like a login screen, don't belong there.

Does a small site need one?

Often not. Google says if your site's pages are properly linked, it can usually discover most of your site.1

Properly linked means you can reach every important page by clicking through the menu or links on other pages.

Google gives a rough guide. A site counts as small at about 500 pages or fewer, and it needs less help if it's linked together well and has few video or image files to show.1

A sitemap helps more in a few cases:

  • The site is large, so some pages might not be linked from anywhere.
  • The site is new and few other sites link to it. Googlebot might not discover your pages if no other sites link to them.1
  • The site has a lot of video or image content.

Google adds that in most cases, a site will benefit from having a sitemap.1

You may already have one

If you use a website builder such as WordPress, Wix or Blogger, it's likely your system has already made a sitemap. Search for how your own platform handles it before you build anything by hand.1

What the other tags do

Only the address of each page is required. The sitemaps.org protocol says all other tags are optional.3 The next pages explain the tags line by line. See How to Read a Sitemap File, Line by Line for that, and Sitemap or robots.txt: What Each One Does if you're not sure how the two files differ.

Cited material

  1. What Is a Sitemap, Google Search Central
  2. Build and Submit a Sitemap, Google Search Central
  3. sitemaps.org Protocol, sitemaps.org