The fix, in one snippet
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc>https://example.com/</loc><lastmod>2026-09-21</lastmod></url>
</urlset>
Illustrative values. Change the paths, hostnames and options to match your own site before using it.
The sections below explain what is tested, why it matters and the alternatives.
What we test
We look for a sitemap in the two places a crawler does: any Sitemap: line in robots.txt, and /sitemap.xml. Each candidate is fetched and parsed. The check records whether the response is valid XML, whether it is a sitemap index pointing at further sitemaps, and how many <loc> entries it contains.
The check passes only when a sitemap is both found and declared in robots.txt. A sitemap that exists but is not declared still works for engines that guess the conventional path; it fails for anything that does not.
Why it matters
Internal linking is how most pages are discovered, and it is uneven: new pages, deep archive pages and pages reachable only through a search form get crawled late or never. A sitemap is a direct list, which shortens discovery from weeks to days.
It also carries lastmod, which tells an engine which pages are worth recrawling. Google has said publicly that it uses lastmod when the value is consistently accurate, and ignores it when it is not, so a sitemap that stamps every URL with today's date is worse than one with no dates at all.
None of this is a ranking factor. A sitemap does not make a page rank; it makes a page findable, which is the precondition.
How to fix it
Generate the sitemap from the same data that generates your navigation, so the two cannot drift apart. Include only canonical, indexable, 200-status URLs. Split it at 50,000 URLs or 50 MB uncompressed and use a sitemap index.
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/guides/first-post</loc>
<lastmod>2026-09-14</lastmod>
</url>
</urlset>
Then declare it in robots.txt with Sitemap: https://example.com/sitemap.xml and submit it once in Google Search Console and Bing Webmaster Tools. Set lastmod from the real modification time or leave it out.
Where this fits
XML sitemap published and declared is check 9 of 10 that the seo & site health audit runs under indexing and crawlability, ordered the way they are worth fixing. That ordering is the point: Fixing this one while the check above it still fails buys less than it looks like.
Fix this one first
Above it in the same category sits Sitemap URLs are live and indexable (medium), where every URL in a sitemap is a claim that the page exists and should be indexed. An attacker who has that does not need this, so it is the better use of the same hour.
What fixing this still leaves open
XML sitemap published and declared closes one route in. The next one down is robots.txt present and usable, where robots.txt is the first file a crawler asks for.
Found in the same scan
The seo & site health audit reports this alongside checks from other categories that are at least as serious, including Broken internal links, where an internal link that returns an error is a dead end for the reader and a wasted request for the crawler, and Duplicate body content, where two pages with identical body text are one page at two addresses, and search engines will pick one of them for you. A single run of seo & site health audit answers all of them at once.
The first few lines
You are a senior web engineer. I ran a security and SEO scanner against my site and it reported the finding below. Fix it properly rather than suppressing the symptom.
Finding: XML sitemap published and declared (medium severity)
Scanner check id: seo-sitemap
The rest of this prompt names the pages and line numbers we found the problem on, the configuration to change, and the constraints a good answer has to respect. It is free, it just needs an account so the work is not scraped wholesale.
Sign in with GoogleSigning in is free and takes one click. We store your email address and nothing else.