Insights › Technical SEO
sitemap.xml: what goes in it, what breaks it, and how to tell it's working
A sitemap tells search engines which URLs to crawl. Get it wrong and Google wastes its crawl budget on dead pages or misses your content entirely. Here's what belongs in it, how generated apps break it, and how to verify it.
Aug 8, 2026 · 6 min read
The short version
A sitemap is a list of your indexable URLs in XML format. It's not optional for a new app: without inbound links from established sites, Google has no other way to discover your pages. But a sitemap with stale URLs, missing entries, or URLs that conflict with your canonical tags is worse than no sitemap at all — it wastes Google's crawl budget on dead ends and confuses its indexing.
What belongs in a sitemap
Only indexable, canonical pages. Every URL listed should:
- Return a 200. A sitemap that lists 404s or redirects wastes crawl budget — Google tries each one, gets bounced, and stops trusting the sitemap.
- Be the canonical URL. The URL in the sitemap must match the
<link rel="canonical">on the page byte-for-byte, including protocol, host and trailing slash. - Not be blocked by robots.txt or a `noindex` meta tag. Listing a blocked page tells Google to index something you told it not to — inconsistent signals get ignored.
- Be self-contained. Don't list pages that are thin duplicates or parameterized variants (
?ref=,?session=) unless they're genuinely distinct content.
The three lines that make it work
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://yourapp.com</loc>
<lastmod>2026-08-08</lastmod>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>
<url>
<loc>https://yourapp.com/pricing</loc>
<lastmod>2026-08-01</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
</urlset>Then reference it in robots.txt — this is the discovery chain that lets Google find the sitemap without already knowing it exists:
Sitemap: https://yourapp.com/sitemap.xmlHow generated apps break it
| Mistake | What happens | Fix |
|---|---|---|
| No sitemap at all | Google discovers pages by luck from inbound links — a new app has none, so nothing gets indexed | Generate one with your public routes |
| Lists dev/staging URLs | Google indexes your staging site and splits ranking signals from production | Generate from the production URL only |
| URLs don't match canonicals | Google sees competing signals and may index neither version | Make sitemap and canonical identical per page |
| Stale after a route change | Google crawls old pages that now 404, wastes budget, trusts the sitemap less | Regenerate on every deploy that adds or removes routes |
| Missing from robots.txt | Google may never find the sitemap unless someone links to it directly | Add Sitemap: directive to robots.txt |
How to verify it's working
- 1
Open it directly
Load
https://yourapp.com/sitemap.xmlin a browser. You should see XML with your URLs, not a 404 or a redirect. - 2
Submit it in Google Search Console
Under Indexing → Sitemaps, add your sitemap URL. A green "Success" means Google found and read it. A red status tells you exactly what's wrong.
- 3
Check the indexed page count
In Search Console, under Indexing → Pages, compare the number of indexed pages to the number of URLs in your sitemap. A large gap means many pages are discovered but not indexed — usually because of thin content or a noindex tag.
- 4
Audit the sitemap URLs
Crawl the sitemap with any URL checker and confirm every entry returns a 200, has a matching canonical, and isn't blocked by robots.txt.
Actuant checks whether your sitemap exists, whether robots.txt references it, and whether the URLs in it match your canonicals — all deterministic, all pass-or-fail.
Keep reading
robots.txt: the rules, the mistakes, and the one-line check
robots.txt tells crawlers which pages to skip. A misconfigured one blocks your entire site from being indexed — and it's a one-line mistake. Here's what to put in it, what to keep out, and how to check it in 10 seconds.
Canonical tags: the rules that actually matter
A canonical tag tells Google which URL is the real one when a page is reachable at several addresses. Get it wrong and you split your ranking signals or deindex the wrong page. Here are the seven rules, and how generated apps break them.