Check A1.2 · Sitemap declared and reachable

Publish an XML sitemap that crawlers and agents can find

How AI crawlers and agents find a store's XML sitemap, where the scanner looks for it, and how to publish and declare one on WordPress, Shopify and other stacks.

By · Updated · Markdown

Check 2 of 8 in Discoverability · 2 of 87 overall
Priority
Expected Weight 2. Expected of a well-run store and counted in the section score.
Readiness level
Not a level gate. It counts toward its section score.
The question
Is there a sitemap an agent can fetch?
On this page

In short

An XML sitemap is a file that lists the URLs on your site you want crawlers to know about. Declaring it in robots.txt (the file that tells crawlers what they may fetch) and serving it at a standard path lets search crawlers and AI agents (software that finds, compares or buys on a person's behalf) list your pages without guessing. This check passes when the scanner finds a sitemap that parses and lists at least one URL or child sitemap.

What this check looks at

The Sitemaps protocol at sitemaps.org defines two kinds of file:

  • A URL set lists page URLs, each in its own entry, optionally with the date the page last changed.
  • A sitemap index lists other sitemap files. Large sites split their URLs across several child sitemaps, for example one for products, one for categories and one for pages.

The protocol also lets you announce a sitemap with a Sitemap: line in robots.txt. That line holds the absolute URL of the sitemap or the sitemap index. It is the one place every crawler looks.

The scanner looks for a sitemap in this order:

  1. Every Sitemap: line in your robots.txt, in the order they appear.
  2. The usual paths, in the order your platform uses them. On WordPress and WooCommerce that is /wp-sitemap.xml (the index WordPress core has generated since version 5.5) and /sitemap_index.xml (the index Yoast SEO and Rank Math publish) before /sitemap.xml. Elsewhere /sitemap.xml (the conventional location and Shopify's default) comes first, and /wp-sitemap.xml is not tried.

The first candidate that answers HTTP 200 with valid sitemap XML is used. Discovery stops at the first rate limit (429) or server error, and a home page that refused the scanner gets only the sitemaps robots.txt declares. Only sitemaps and URLs on the same origin (scheme and host) as the store count, because a sitemap on another host does not describe this store. The scanner makes at most four sitemap requests per scan, child sitemaps included.

Why it matters for AI agents

A crawler is a program that visits pages on its own to build an index. One that only follows links finds what your navigation exposes. Products buried three levels deep, in filtered views or behind a "load more" button may never be reached. A sitemap closes that gap. It is a complete, cheap list of every URL you want known.

Agents that need to list a whole catalog, rather than answer one question, benefit for the same reason: one request returns the list, where crawling would take hundreds. The product URL check and the lastmod check both depend on this one: without a readable sitemap, neither can run.

This check is not a level gate by itself. But a product sitemap is one of the ways a store can show for Level 2 that agents can list its catalog, and that needs a sitemap the scanner can read first.

How the scanner decides

  • Pass: a sitemap index or URL set was found, parses as sitemap XML, and lists at least one URL or child sitemap.
  • Warn: a sitemap was found and parses, but lists no URLs and no child sitemaps. It also warns when a sitemap file breaks the protocol limits: a Content-Length above 50 MB (the limit counts the uncompressed file, so a larger compressed file is over it too), or more than 50,000 entries counted in one file.
  • Fail: none of the candidates answered HTTP 200 with parseable sitemap XML. The message lists the paths tried.
  • Skipped as inconclusive: discovery stopped on a rate limit or server error, a candidate gave no response, or the four requests ran out before every candidate was tried. Whether a sitemap exists is then not established. The same applies when the home page refused the scanner and robots.txt declares no sitemap it could read.

The report also records whether the sitemap it used is declared in robots.txt. That does not change the verdict, because the fallback paths are checked anyway. It is still worth fixing, because other crawlers may not try those paths.

How to fix it

Use the sitemap your platform already generates before writing one by hand. A generated sitemap stays current as products are added and removed.

WordPress and WooCommerce

  • WordPress core publishes a sitemap index at /wp-sitemap.xml. WooCommerce products appear in it as their own child sitemap.
  • Yoast SEO, Rank Math and similar plugins switch the core sitemap off and publish their own index, usually at /sitemap_index.xml. Make sure the sitemap feature is enabled in the plugin settings.
  • Under Settings, Reading, the option that discourages search engines from indexing the site also disables the core sitemap. Turn it off on a live store.
  • Add a Sitemap: line to robots.txt for whichever index is active. SEO plugins often add it for you, so check the live file.

Shopify

  • Shopify generates a sitemap index at /sitemap.xml for every store, with child sitemaps for products, collections, pages and blog posts. There is nothing to switch on.
  • Shopify's default robots.txt already declares it. If you customised robots.txt.liquid, keep the sitemap line in the template.
  • On a store with several domains, check the sitemap on the domain customers actually use. The scanner reads the one on the host it scans.

Any other stack

  • Generate the sitemap from your product database, not from a crawl, so it lists every published product.
  • Serve it as plain, uncompressed XML with status 200. Use absolute URLs on the same host as the pages.
  • Keep each file under the protocol's limits of 50,000 URLs and 50 MB uncompressed, and use a sitemap index when you need more files.
  • Declare the index in robots.txt with its absolute URL.

Verify it yourself

Find the declared sitemap, then fetch it:

curl -s https://example.com/robots.txt | grep -i '^sitemap:'
curl -sS -D - https://example.com/sitemap.xml | head -n 30

You should see status 200, an XML content type and a body that starts with an XML declaration followed by urlset or sitemapindex. Google Search Console and Bing Webmaster Tools both report errors for sitemaps you submit to them.

Common mistakes

  • A sitemap on a different host. A sitemap served from a CDN or a separate domain is ignored here, because it does not prove anything about the store's own host.
  • A soft 404 at /sitemap.xml. A storefront that answers every unknown path with its home page returns status 200 with HTML. That is not a sitemap.
  • A sitemap that lists nothing. An index whose child sitemaps were all switched off, or a URL set generated before any products existed, parses fine but helps nobody.
  • A stale robots.txt line. After changing SEO plugins, robots.txt sometimes still points at the old plugin's index, which now answers 404.

FAQ

Where should my sitemap be located?

At a stable URL on the same host as your pages, usually /sitemap.xml or the path your platform uses, and declared in robots.txt with a Sitemap: line. The declaration matters more than the path.

Do I need to submit my sitemap to Google and Bing?

Submitting it in Search Console and Bing Webmaster Tools gives you error reports and faster discovery. Declaring it in robots.txt makes it findable for every other crawler and agent, including this scanner.

Can my sitemap be gzip-compressed?

Yes. The protocol allows gzip, and the scanner inflates a .xml.gz file before reading it. The 50 MB limit applies to the uncompressed file. The scanner reads the first 2 MB of each file, which is enough to judge it, and says so when a file is larger.

How many URLs can one sitemap contain?

The Sitemaps protocol allows up to 50,000 URLs and 50 MB uncompressed per file. Beyond that, split the URLs into several files and list them in a sitemap index, which may list up to 50,000 sitemaps itself. A catalog of 100 million products fits in 2,000 files of 50,000 URLs and one index. The guide How to serve a catalog of millions of products explains how to split a catalog and keep it fresh.

The fix in one step

Publish an XML sitemap and declare it in robots.txt, so crawlers and agents can list the site's pages without following links.

Sitemap: https://example.com/sitemap.xml

By platform

WordPress and WooCommerce
Core WordPress serves /wp-sitemap.xml, and SEO plugins usually replace it with /sitemap_index.xml. If an SEO plugin provides the sitemap, point the Sitemap line at that plugin's index instead of the core one.
Shopify
Shopify generates /sitemap.xml and declares it in robots.txt. When this check fails, look for a robots.txt.liquid template or a proxy that removed the line.
Prompt for a coding agent

The scanner found no usable sitemap on this site: none of the Sitemap lines in robots.txt, /sitemap.xml, /sitemap_index.xml or /wp-sitemap.xml answered HTTP 200 with valid sitemap XML on the store's own host, or the sitemap it found lists no URLs. Make the site serve a sitemap index (or a single URL set) at a stable URL on the same host as the pages, generated from the platform or catalog data so it lists every published page and product. Serve it as uncompressed XML with absolute URLs. Add a `Sitemap:` line with its absolute URL to robots.txt. Verify with `curl -sS -D - https://<domain>/sitemap.xml` (or the declared URL): status 200 and a body that starts with `<urlset` or `<sitemapindex` and lists at least one entry.

Guides on this topic

Sources and specifications

See how your store does

One scan runs every check in this knowledge base against your site and ends with a prioritised fix list.

Scan a store