← Back to the blog

XML Sitemap Best Practices (and What Silently Breaks Them)

XML Sitemap Best Practices (and What Silently Breaks Them)

An XML sitemap is the simplest way to tell search engines which pages on a site actually matter. Done well, it helps Google find and understand your important pages faster. Done carelessly, it feeds Google a list full of redirects, dead pages, and URLs you never wanted indexed, and slowly erodes trust in the site. Here are the practices that keep a sitemap useful, the mistakes that quietly break it, and why a sitemap that was perfect last month may not be today.

Deltio watches your client sitemaps for the changes that break them silently, and alerts you on Slack when something shifts. From £20 a month.

What a sitemap is actually for

An XML sitemap is a list of the URLs you want search engines to know about, along with a little metadata about each. Its job is discovery: it helps engines find pages, understand which ones you consider canonical, and prioritise crawling, especially on large sites or ones with pages that are not well linked internally.

It helps to be clear about what a sitemap is not. It is not a ranking factor, and including a URL does not force Google to index it. A sitemap is a recommendation, not a command. That is exactly why the quality of the list matters so much: it is a signal of what you think is important, and a messy list sends a messy signal.

The best practices that matter

Most sitemap advice comes down to one principle: the sitemap should be a clean, honest list of the pages you want indexed, and nothing else.

None of this is complicated. The difficulty is that a sitemap is generated by software, and software changes without telling you.

The mistakes that quietly break a sitemap

The dangerous sitemap problems are not the ones that throw an error. They are the ones that leave the file valid but wrong.

The common thread is that all of these happen after launch, triggered by an update nobody connected to the sitemap, and none of them are visible unless you go and look.

Why sitemaps break silently, and why that hurts agencies

A sitemap is almost always machine-generated, by the CMS, an SEO plugin, or a build step. That means any update to any of those can change it: a plugin version bump, a template change, a migration, a caching layer. The person making that change is rarely thinking about the sitemap, so the breakage is a side effect nobody notices.

If you manage one site, you might eventually spot it. If you manage twenty client sites you don't control, you won't, because there is no reason to open a sitemap on a Tuesday for a site that seems fine. Meanwhile a client site has quietly dropped four hundred URLs from its sitemap, or started listing every redirected page, and the first sign is a slow slide in crawling and indexing weeks later.

How to keep a sitemap honest over time

You can audit a sitemap by hand: open it, check the URL count, spot-check that entries return 200 and are indexable, and confirm it is referenced in robots.txt. That works for a site you remember to check.

Monitoring is what covers the sites you don't. Deltio watches the sitemaps on your client sites and flags the changes that matter: the URL count jumping or dropping, URLs disappearing, and the related indexing signals shifting on the pages the sitemap points to. When something changes, you get a plain alert on Slack naming the site, the same day it happens, instead of inferring it from a traffic report a month later. It watches the neighbouring signals the same way, noindex, canonicals, and robots.txt, because a sitemap rarely breaks in isolation. You can see how those alerts work in SEO change alerts, and the robots.txt side in how to check your robots.txt.

The short version

A good XML sitemap is a clean, current list of only the canonical, indexable pages you want found, kept under the size limits and referenced in robots.txt. The best practices are easy; keeping them true as the site changes is the hard part, because the file is generated by software that gets updated without anyone thinking about the sitemap. On sites you are responsible for, the practice that actually protects you is being told the day the list changes.

Add your first client site, connect Slack, and Deltio starts watching the same day. Start your 14-day trial and find out what's really in your clients' sitemaps.

Frequently asked questions

What should an XML sitemap contain?
Only the canonical, indexable URLs you want search engines to find. Every URL should return a 200 status, be canonical to itself, and not carry a noindex. Redirects, dead pages, and pages you don't want indexed should be left out.
Is an XML sitemap a ranking factor?
No. A sitemap helps search engines discover and prioritise pages, but including a URL does not force Google to index it and does not directly affect rankings. It is a recommendation about what you consider important, which is why keeping the list clean matters.
How many URLs can a sitemap have?
A single sitemap file should stay under 50,000 URLs and 50MB uncompressed. Beyond that, split the URLs across multiple sitemap files and connect them with a sitemap index file.
What is the lastmod tag and does it matter?
Lastmod tells search engines when a page's content last genuinely changed, which can help them prioritise recrawling. It only helps if it is honest. If every URL is stamped with today's date at every rebuild, the field becomes noise and engines learn to ignore it.
How does a sitemap break without anyone noticing?
Because it is generated by software. A CMS update, plugin change, migration, or build bug can start including redirected or noindex URLs, silently drop real pages, or stamp stale lastmod dates on everything. The file still parses fine, so nothing errors and nobody looks.
How can an agency keep client sitemaps healthy?
Manual audits work for a site you remember to check. For a portfolio, Deltio monitors client sitemaps and alerts you on Slack when the URL count jumps or drops, when URLs disappear, or when the indexing signals on those pages change. Starter is £20 / €24 / $26 a month with a 14-day trial.