GLOSSARY · TECHNICAL SEO

What is an XML sitemap?

IN ONE SENTENCEAn XML sitemap is a file that lists the pages of a website you want search engines to find and show in their results.

What an XML sitemap looks like

An XML sitemap is a file made for search engines, not for visitors. It usually lives at /sitemap.xml. A minimal one with two pages looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://www.example.com/</loc>
    <lastmod>2026-09-14</lastmod>
  </url>
  <url>
    <loc>https://www.example.com/repot-a-houseplant</loc>
    <lastmod>2026-08-02</lastmod>
  </url>
</urlset>

That is the whole format. The first line says the file is XML. The urlset element wraps the list, and its xmlns value tells search engines which sitemap standard the file follows. Each url block holds one page. Most site builders, including WordPress, Shopify, Wix and Squarespace, create and update this file for you.

What each tag means

  • loc is the full address of the page, starting with https://. It must be the exact address you want in search results, on the same domain as the sitemap.
  • lastmod is the date the page last changed in a meaningful way, written as year, month and day. Google uses it when it is accurate across the whole file. Setting every page to today's date teaches Google to ignore it.
  • changefreq and priority are optional tags you will still see in many sitemaps. Google ignores both, so there is no point in tuning them.

Special characters in an address must be written in XML form. An ampersand, for example, becomes &amp;. A sitemap generator handles this for you.

The sitemap.xml format comes down to four rules:

  1. The file is plain XML in UTF-8, usually saved as sitemap.xml at the root of the site.
  2. Everything sits inside one urlset, with one url block per page.
  3. Each loc is a full address, including https://.
  4. One file holds up to 50,000 addresses or 50 MB. Bigger sites use a sitemap index, shown below.

To make one from a list of addresses, use the free XML sitemap generator. It writes a valid file you can copy or download.

A larger example: the sitemap index

One sitemap file may list up to 50,000 addresses and be up to 50 MB before compression. Bigger sites split their pages into several sitemaps and list those files in a sitemap index:

<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap>
    <loc>https://www.example.com/sitemap-pages.xml</loc>
  </sitemap>
  <sitemap>
    <loc>https://www.example.com/sitemap-products.xml</loc>
  </sitemap>
</sitemapindex>

Splitting by type, such as pages, posts and products, also makes the Search Console report easier to read, because problems show up per file.

Why it matters

  • It helps pages get found. Crawling starts with knowing that an address exists. A sitemap is most useful for new sites, large sites and pages with few links pointing to them.
  • It is a list of suggestions, not a promise. Being in the sitemap does not guarantee indexing. Google still decides whether each page is worth showing.
  • It does not replace links. An internal link tells a search engine that a page exists and that it matters to you. A page that appears only in the sitemap looks less important than one your other pages link to.
  • It shows you problems. The Sitemaps report in Search Console tells you how many of the listed pages are indexed, which makes gaps easy to spot.

What to leave out

A sitemap should list only pages you want to appear in search results. Leave out:

  • addresses that redirect somewhere else
  • pages that return an error, such as 404 not found
  • pages marked noindex
  • duplicate versions of a page, where a canonical tag points to another address
  • pages blocked in robots.txt
COMMON MISTAKEListing every address the site has. Each address in the sitemap is a claim that the page deserves to be indexed. Redirects, errors and noindex pages in the list send mixed signals and make the Search Console report noisy.

XML sitemap or HTML sitemap?

An HTML sitemap is an ordinary page with a list of links, written for people. An XML sitemap is a file written for search engines. They do different jobs: the HTML version can help visitors and spread internal links on a large site, and the XML version tells search engines what to crawl. Most small sites need only the XML file.

How to check and submit yours

  1. Type your domain followed by /sitemap.xml into your browser. If nothing loads, look for a Sitemap: line in your robots.txt file, or try /sitemap_index.xml, which WordPress plugins often use.
  2. Skim the list. Are your important pages there, and are pages you would not want in Google missing?
  3. Open a few of the addresses. Each should load directly, without a redirect or an error. The checker on the XML sitemap tool does this for you: it reads the file and flags addresses that redirect, return errors or are marked noindex.
  4. In Google Search Console, open Sitemaps, paste the sitemap address and press Submit. Do the same in Bing Webmaster Tools.
  5. Come back after a few days and read the report. A large gap between submitted and indexed pages is worth investigating page by page.

The lesson XML sitemaps: what to include and what to leave out goes through each choice in more detail.

Questions

Where is my XML sitemap?

Usually at your domain followed by /sitemap.xml. WordPress plugins such as Yoast and Rank Math use /sitemap_index.xml. If neither loads, look for a Sitemap line in your robots.txt file, which is at your domain followed by /robots.txt.

What format is an XML sitemap?

A UTF-8 XML file following the sitemaps.org protocol: a urlset holding one url block per page, each with a loc address and an optional lastmod date.

Do I need an XML sitemap?

A small site with good internal links can be found without one, but a sitemap costs nothing and helps new pages get found faster. Most site builders make one automatically, so the real job is checking that it lists the right pages.

How often should a sitemap be updated?

Every time you add, remove or meaningfully change a page. Site builders and SEO plugins do this automatically. If you build the file by hand, regenerate it whenever your pages change.

Does an XML sitemap improve rankings?

Not directly. It helps search engines find and recrawl pages, which is a step before ranking. Whether a page ranks depends on its content, its links and how well it answers the search.

How many sitemaps can a site have?

As many as it needs. Each file can hold up to 50,000 addresses, and a sitemap index can list up to 50,000 sitemap files. Most small and medium sites need just one.

Want to see how your own page does? I can check it in about half a minute.

Audit my page