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 #
- 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>
- Include only public, canonical, indexable URLs. Leave out logged-in app pages, redirects and
noindexpages. - Reference it from robots.txt:
Sitemap: https://yourdomain.com/sitemap.xml - Submit it once in Search Console → Sitemaps.
Verify it yourself #
curl -s https://yourdomain.com/sitemap.xml | head -3The output should begin with <?xml and contain <urlset, not <!doctype html>.
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.comneeds its own sitemap. List both in robots.txt and submit both. A Domain property in Search Console covers every subdomain. lastmodshould 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.xmlwith a 200. This site generatessitemap.xmlfrom the pages it publishes on every release and lists it inrobots.txt.
Sources #
- Google: Build and submit a sitemap
- Google: What is a sitemap
- Search Console Help: Sitemaps report