GTMRun

XML sitemap

Last updated: 2026-11-16

Google recommendation

What it is #

An XML sitemap lists the URLs on your site you want search engines to know about, optionally with when each last changed.

Why it matters #

Google can discover pages through links, but a sitemap helps it find new and deep pages sooner. It matters most for new sites with few inbound links, which describes most early-stage products. Search Console's Sitemaps report also tells you how many of those URLs Google actually indexed.

How we check it #

We fetch /sitemap.xml and pass this check if it's real XML containing <urlset> or <sitemapindex>. An HTML body (an SPA fallback page) fails, even with a 200 status. We also count the <url> entries.

How to fix #

  1. Generate the sitemap. Most frameworks and CMSs do it for you (Next.js app/sitemap.ts, WordPress core since 5.5, Webflow, Squarespace). For a static list:
    <?xml version="1.0" encoding="UTF-8"?>
    <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
    <url>
    <loc>https://yourdomain.com/</loc>
    <lastmod>2026-09-30</lastmod>
    </url>
    <url>
    <loc>https://yourdomain.com/pricing</loc>
    </url>
    </urlset>
  1. Include only public, canonical, indexable URLs. Leave out logged-in app pages, redirects and noindex pages.
  2. Reference it from robots.txt: Sitemap: https://yourdomain.com/sitemap.xml
  3. Submit it once in Search Console → Sitemaps.

Verify it yourself #

curl -s https://yourdomain.com/sitemap.xml | head -3

The output should begin with <?xml and contain <urlset, not <!doctype html>.

Runs GTMRun's own checks only — seconds, no third-party calls.

Tips #

  • Submitting beats waiting. Search Console doesn't auto-discover sitemaps on a new property except through robots.txt Sitemap: lines. Submit it yourself.
  • Blog on a subdomain? blog.yourdomain.com needs its own sitemap. List both in robots.txt and submit both. A Domain property in Search Console covers every subdomain.
  • lastmod should be true. Only update it when the page content actually changes.
  • Absolute URLs only, on the same host as the sitemap.
  • What we learned fixing gtmrun.co: we had no sitemap, and our SPA served its app page at /sitemap.xml with a 200. This site generates sitemap.xml from the pages it publishes on every release and lists it in robots.txt.

Sources #