# What is an XML sitemap and how to use it in your store

> What an XML sitemap is, which tags Google uses and which it ignores, which URLs in your store belong in it, and how to check it in Search Console.

URL: https://clione.ai/glossary/xml-sitemap/
Lang: en

An XML sitemap is not the "site map" page some stores link in the footer for people, nor the product file you send to [Google Merchant Center](/glossary/google-merchant-center/). It is a file for machines, usually at `yourdomain.com/sitemap.xml`, that tells search engines **which URLs in your store you want them to know about**. In a catalog with variants, filters and sort orders, which generate many more URLs than you want in a search engine, the sitemap is one of the few places where you say which ones count.

## How it works

The format is defined by the sitemaps.org protocol. The file starts with a `<urlset>` tag that declares the protocol's namespace, and each page goes in a `<url>` with a required `<loc>` carrying its address. Three more tags are optional: `<lastmod>`, the date of last modification in W3C format; `<changefreq>`, how often it changes; and `<priority>`, a value from 0.0 to 1.0. The protocol presents them as hints a search engine may disregard.[^sitemaps-org]

Google is more specific: it **ignores `<priority>` and `<changefreq>`**, and uses `<lastmod>` only if it is consistently and verifiably accurate. The date has to reflect the last significant change to the page, and Google gives an example of a change that is not: updating the copyright date.[^google-build-sitemap]

The limits are the same in the protocol and in Google: **50,000 URLs or 50 MB uncompressed per file**. A larger site splits the list into several sitemaps and gathers them in a sitemap index, which in turn allows up to 50,000 entries.[^sitemaps-org][^google-build-sitemap] URLs must be fully qualified, with protocol and domain, and the file in UTF-8.[^google-build-sitemap]

Location has rules too. According to the protocol, a sitemap at `/catalog/sitemap.xml` can only list URLs that start with `/catalog/`, and all of them must share the file's protocol and domain.[^sitemaps-org] Google recommends putting it at the root, where it can affect the whole site.[^google-build-sitemap]

There are three ways for search engines to find it: submit it in [Search Console](/glossary/google-search-console/), add a `Sitemap:` line to your [robots.txt](/glossary/robots-txt/) or use the Search Console API.[^google-build-sitemap] The robots.txt line carries the sitemap's full URL, does not depend on any rule group and can be followed by all crawlers.[^google-robots-spec]

The most important part is what the sitemap does not do. Google says it twice: submitting a sitemap is **only a hint**, which does not guarantee it will download it or use it for crawling,[^google-build-sitemap] and there is no guarantee that a URL discovered in a sitemap has been or will be crawled, or that it will pass [indexing](/glossary/indexing/).[^gsc-sitemaps-report] Not every site needs one, either. Google recommends it mainly for large sites, with more than 500 pages, for new ones with few external links and for those with a lot of video, images or news; a small, well-linked site may not need it.[^google-sitemaps]

## In a store

Google advises including the URLs you want to see in its results, and reminds you that it tends to show canonical URLs, something the sitemap can influence.[^google-build-sitemap] In a store that translates into a short, clean list: **the [canonical URL](/glossary/canonical-url/) of every [product page](/glossary/product-page/) and every collection**, and not the variants with parameters, the sorted or filtered collections from [faceted navigation](/glossary/faceted-navigation/), internal search results or pages marked [noindex](/glossary/noindex/).

Shopify generates the file without you doing anything. Every store has a `sitemap.xml` at the root of the domain that links to separate sitemaps for products, collections, blogs and pages, with each product's main image, and it updates itself when you add content. If you sell in several languages, they are added to each domain's sitemaps. While the store is password-protected, search engines cannot read it.[^shopify-sitemap]

Here is what the index of a small store and one of its child sitemaps would look like, in a **fictional example**:

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

```xml
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example-store.com/products/blue-stoneware-mug</loc>
    <lastmod>2026-09-28</lastmod>
  </url>
  <url>
    <loc>https://example-store.com/products/stoneware-pitcher-1l</loc>
    <lastmod>2026-08-14</lastmod>
  </url>
</urlset>
```

What is missing is as deliberate as what is there: no `?variant=`, no `?sort_by=`, no `<priority>`, which Google would ignore. And each `<lastmod>` changes only when something on the page that matters changes, such as the price or the description.


**Being in the sitemap is not being in the index.** The Search Console sitemaps report counts the URLs Google has discovered in the file, and the help page itself warns that there is no guarantee they have been crawled or will be indexed. To know how many are, you have to filter the page indexing report by that sitemap.[^gsc-sitemaps-report] The same goes for the tags: raising the `<priority>` of your star product pages or updating every `<lastmod>` on each deploy gets you nothing, because Google ignores the first and **only uses the second if it is accurate**.[^google-build-sitemap]


## How to check

1. **Open `yourdomain.com/sitemap.xml` in the browser.** If it is an index, open each child sitemap and look at what kind of URLs it carries.
2. **Open your robots.txt and look for the `Sitemap:` line**, with the full URL.[^google-robots-spec]
3. **Submit the sitemap in Search Console and look at its status** in the sitemaps report, which distinguishes three cases: Google read it without errors, read it with errors or could not download it.[^gsc-sitemaps-report]
4. **Filter the page indexing report by that sitemap** to see how many of its URLs are indexed.[^gsc-sitemaps-report] Read the reasons for the ones that are not in the [indexing](/glossary/indexing/) entry.
5. **Review a sample of URLs**: they should return a 200, their canonical should be themselves and they should not carry `noindex`. A URL you do not want in the results has no business in the sitemap.[^google-build-sitemap]

## Related concept: product feed

The sitemap and the [product feed](/glossary/product-feed/) get confused because both list the catalog, but they say different things. The sitemap gives addresses: which URLs exist and when they changed. The Google Merchant Center feed gives data: each product with its identifier, title, description, link to its page, main image, availability and price, which Google uses to match your products with the right searches.[^merchant-spec] **A sitemap carries the price of nothing**, and a feed does not replace having your product pages be crawlable.

To go further, the [comparison](/comparisons/llms-txt-sitemap-structured-data/) puts the sitemap next to [llms.txt](/glossary/llms-txt/) and [structured data](/glossary/structured-data/), and this topic's [reading path](/learn/crawling-and-indexing/) puts the rest of the terms in order.
