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.