SEO

XML Sitemap

Also called sitemap.xml

A machine-readable list of the URLs you want indexed, offered to search engines as a discovery hint.

Quick facts: XML Sitemap

Category
SEO
Also called
sitemap.xml
Level
Beginner
Affects
Discovery of new pages, crawl efficiency, index coverage checks
Where to see it
Search Console sitemaps report, your SEO plugin, Screaming Frog
In this article4
  1. How an XML sitemap works
  2. Why an XML sitemap matters
  3. Common mistakes with XML sitemaps
  4. How to act on it

How an XML sitemap works

An XML sitemap is a machine-readable list of the addresses you want search engines to know about. Each entry holds the address and, optionally, when it last changed. Large sites split the list across several files and tie them together with a sitemap index. The file is usually generated by the content management system or an SEO plugin and updated whenever content is published.

Search engines find it in one of two ways: a line in robots.txt pointing at it, or a submission in Search Console. Either works, and doing both is normal.

What it does not do is force anything. A sitemap is a hint about what exists and when it changed. Inclusion does not guarantee crawling, and crawling does not guarantee indexing — the engine still decides whether each page is worth keeping.

Why an XML sitemap matters

It helps most where link discovery is weakest: a new site with few external links, a large catalogue with deep pagination, a section reachable only through filters, or pages published faster than crawlers happen to return. It also gives a change signal, which can shorten the wait after you update an important page.

Its quieter value is diagnostic. Because the sitemap is your stated list of what should be indexed, comparing it against what actually is indexed is one of the clearest health checks available, and the gap between the two is usually where the real problems sit.

Common mistakes with XML sitemaps

The most common is a sitemap that disagrees with the rest of the site. Listing addresses that redirect, return errors, are blocked from crawling, or carry a noindex directive sends contradictory instructions, and a file full of contradictions is trusted less as a whole.

The second is treating it as an indexing lever. Resubmitting a sitemap does not make a weak page rank, and listing a page does not compensate for that page having no internal links pointing at it.

The third is neglect. A plugin generates the file correctly on day one, then a staging domain, an abandoned category structure or a set of attachment pages creeps in and nobody looks again. Automatically generated does not mean self-correcting.

How to act on it

Keep the file to canonical, indexable, working addresses and nothing else. If a page belongs in the sitemap it should return a normal response, be allowed in robots.txt, be free of noindex, and point its canonical tag at itself. If any of those is untrue, the address should not be listed.

Submit it in Search Console and then actually use the report rather than filing it away. It shows how many of the submitted addresses are indexed, and a widening gap is an early warning of quality or duplication problems. Recheck the file after any migration, plugin change or redesign — like robots.txt, it is one of the first things worth verifying in a technical SEO review.

Do and do not

Do

  • List only canonical, indexable, working addresses
  • Point to it from robots.txt and Search Console
  • Compare submitted addresses against indexed ones regularly

Do not

  • Include redirects, errors or noindexed pages
  • Expect a sitemap entry to replace internal links
  • Assume a generated file stays correct forever

Questions people ask about this

Does an XML sitemap help my rankings?

Not directly. It helps search engines discover and revisit pages, which matters most on large sites, new sites and sections that are hard to reach by following links. Once a page has been found and indexed, the sitemap adds nothing to how well it ranks. Think of it as a discovery aid rather than a ranking tool.

Should every page be in the sitemap?

Only the ones you want indexed. Leave out redirects, error pages, anything blocked in robots.txt, anything carrying a noindex directive, and duplicate versions that point their canonical tag elsewhere. A short accurate list is more useful than a long one, because contradictions between the sitemap and the pages themselves undermine the file's credibility.

How often should the sitemap be updated?

It should update itself. Almost every content management system and SEO plugin regenerates the file whenever you publish or change a page, which is exactly what you want. What needs a person is a periodic review, after a migration, a redesign or a plugin change, to confirm the file still contains only the addresses it should.

Related terms

Found this useful?

Share it, or ask an AI to summarise it

Back to the glossary

Knowing the term is the easy part

Applying it to your own site and budget is the work. Book a call and I will tell you what actually applies to you.