Website Checker - What Is an XML Sitemap? Syntax, Limits, and Mistakes

What Is an XML Sitemap? Syntax, Limits, and Mistakes

Aug 01, 2026 · SEO Glossary

Here's the entire file format, more or less. A minimal, valid XML sitemap:

<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url><loc>https://example.com/</loc><lastmod>2026-08-10</lastmod></url></urlset>

One namespace declaration, one <url> entry per page, done. If you're asking what is an XML sitemap, that file is the answer: a machine-readable list of the URLs on your site you'd like search engines to crawl, published at a stable address (conventionally /sitemap.xml) and referenced from robots.txt or submitted in Search Console. The format is trivial. Everything interesting is in what you put in it — and what you keep out.

What Is an XML Sitemap For — and Not For?

A sitemap solves the discovery problem: it tells crawlers URLs exist without them having to find every one by following links. It matters most when link-based discovery is weak — new sites with few inbound links, large sites with deep archives, pages rendered client-side, or fast-moving content where you want changes noticed quickly.

Now the disclaimers, because sitemap myths are stubborn. A sitemap is a hint, not a command: listing a URL doesn't guarantee crawling, let alone indexing. It's not a ranking factor — pages don't rank higher for being listed. And it doesn't override anything: a listed URL that's blocked in robots.txt or carries a noindex tag stays blocked or noindexed. Think of it as metadata you volunteer, weighted by how trustworthy your past submissions have been.

The Tags, and Which Ones Google Still Reads

TagRequiredDoes Google use it?
<loc>YesYes — the URL itself; must be absolute, canonical, and under 2,048 characters
<lastmod>NoYes, as a recrawl signal — if it's consistently accurate
<changefreq>NoNo — publicly confirmed ignored
<priority>NoNo — publicly confirmed ignored

That table saves you real work: half the sitemap tutorials online still recommend hand-tuning priority values that no major engine has read for years. Spend the effort on lastmod instead — Google uses it to decide what to recrawl, but only from sites whose dates prove reliable. Stamp every URL with the current date on every regeneration and the field gets ignored domain-wide, which forfeits the one real optimization the format offers. Emit the true content-change date in W3C format (2026-08-10 or full datetime with timezone), or omit the tag.

The Limits and the Inclusion Policy

Hard limits first: 50,000 URLs or 50MB uncompressed per file, whichever comes first. You can gzip the file for transfer (the size cap still applies pre-compression), and bigger sites split into multiple files tied together by a sitemap index.

Within those limits, the inclusion rule is one sentence: every URL in the sitemap should be one you'd be happy to see in search results — canonical, indexable, returning 200. Concretely, exclude:

  • redirecting URLs (list the destination instead),
  • 404s and soft-404s,
  • noindexed pages — a sitemap entry says "index this" and the meta tag says "don't"; the contradiction wastes crawls and muddies your Search Console reports,
  • non-canonical variants (parameter versions, http:// duplicates, pagination beyond page one in most cases),
  • thin utility pages: internal search results, cart, login, tag archives with one post.

Google has described using sitemaps as a canonicalization hint — listing a URL is a small vote for it as the canonical version. A sitemap full of redirects and duplicates casts those votes on the wrong candidates.

Keeping the File Truthful Over Time

Sitemaps rot. Pages get deleted, redirects accumulate, a CMS update changes URL patterns — and the sitemap keeps confidently listing last year's site. This is why generation strategy matters more than format knowledge: the file should be produced automatically from your actual content source (database or build pipeline — the options are compared in our sitemap generator guide), regenerated on change, and audited on a schedule. An automated crawl from WebsiteChecker.Tech cross-checks the sitemap against reality in both directions: URLs listed but broken, redirected, or noindexed, and — just as useful — indexable pages the crawl found that the sitemap forgot, which usually indicates the generator's exclusion rules are too aggressive or a content type was never wired in.

Submission and What the Reports Tell You

Reference the sitemap from robots.txt (Sitemap: https://example.com/sitemap.xml — one of the few directives there that takes a full URL) and submit it in Search Console under Indexing → Sitemaps. Then use the report for what it's genuinely good at: the discovered-versus-indexed ratio. Search Console shows how many URLs from the file made it into the index; a healthy content sitemap runs high, and a ratio stuck around 50% is Google telling you it evaluated your listed pages and declined half — a quality or duplication investigation, not a sitemap syntax problem. That ratio, tracked per file over time, is the cheapest indexing health metric a site can have.

Frequently Asked Questions

Does an XML sitemap help my pages rank higher?

No — it affects discovery, not ranking. A sitemap helps crawlers find URLs sooner, which matters for new, deep, or poorly-linked pages. Once a page is crawled and indexed, its sitemap membership plays no further role in where it ranks.

Should every page on my site be in the sitemap?

Only pages you want indexed: canonical, returning 200, not blocked or noindexed. Redirects, duplicates, and utility pages like carts or internal search results should stay out. The sitemap is a curated inventory, not a database dump of every route your site can serve.

Are changefreq and priority worth setting?

No. Google has confirmed it ignores both tags, and has for years. The only optional tag with real effect is lastmod, which influences recrawl scheduling — provided the dates reflect genuine content changes rather than being reset on every file regeneration.

What happens if my sitemap exceeds 50,000 URLs?

Split it. The protocol caps each file at 50,000 URLs or 50MB uncompressed, so large sites publish multiple child sitemaps and tie them together with a sitemap index file, which is itself submitted once to Search Console and can reference up to 50,000 children.

Try WebsiteChecker.Tech Free

Run a free technical SEO audit on any website. Get a client-ready report in minutes.

Start Free Scan