No XML sitemap found: how to create one in WordPress and get it found

This means the audit could not find an XML sitemap: not at any Sitemap: URL in your robots.txt, and not at the usual locations /sitemap.xml, /sitemap_index.xml or /wp-sitemap.xml. A sitemap is a machine-readable list of the URLs you want search engines to crawl. Fix it by enabling one, confirming it loads as XML, and listing it in robots.txt and Google Search Console.

It is an optimization because small, well-linked sites get crawled fine without one. But a sitemap helps new and updated pages get discovered faster, and Search Console's sitemap reports are one of the easiest ways to see which pages Google has and has not indexed.

What it looks like in the HTML

Before

html
GET /sitemap.xml
HTTP/1.1 404 Not Found

After

html
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap>
    <loc>https://example.com/sitemap-post.xml</loc>
    <lastmod>2026-09-28T09:12:00+00:00</lastmod>
  </sitemap>
</sitemapindex>

Why it matters

Search engines find pages mainly by following links. A sitemap adds a direct list, with last-modified dates, so crawlers can find pages that are poorly linked and notice updates sooner. It matters most on large sites, new sites with few backlinks, and sites that publish often.

A sitemap does not guarantee indexing; Google still judges each URL on its own. What it guarantees is that Google knows the URL exists. See XML sitemap best practices for what to include and leave out.

Why a WordPress site may have none

WordPress has generated a basic sitemap at /wp-sitemap.xml since version 5.5, so a missing one usually has a specific cause:

  • "Discourage search engines" is on. WordPress disables its core sitemap when Settings → Reading → Discourage search engines from indexing this site is checked.
  • An SEO plugin replaced it with its own sitemap at a different URL, then its sitemap feature was switched off.
  • Sitemaps were disabled by a snippet using the wp_sitemaps_enabled filter, or by a performance or security plugin.
  • The sitemap returns HTML. A caching layer, a redirect or a theme 404 page answers the sitemap URL with an HTML page, which is not a valid sitemap.
  • A custom location not listed in robots.txt, so crawlers and this audit cannot find it.

How to fix it in WordPress

  1. Check Settings → Reading. Make sure Discourage search engines is unchecked on a live site.
  2. Enable a sitemap. In Hydrogen SEO, open Hydrogen SEO → Sitemap, turn on Enable XML Sitemap, choose which post types and taxonomies to include, and click Save Changes. Hydrogen SEO builds a sitemap index with a child sitemap per type, includes images, leaves out noindexed and password-protected content, and clears its cache when content changes. Use View Sitemap to open it.
  3. List it in robots.txt. Hydrogen SEO adds the Sitemap: line to robots.txt automatically. If you use a physical robots.txt file, add the line yourself. The audit reports a separate note when a sitemap exists but robots.txt does not reference it.
  4. Submit it in Google Search Console. Under Sitemaps, enter the sitemap index URL. This is what unlocks the per-sitemap indexing reports.
  5. Purge caches if the sitemap URL returns an old or HTML response. A page cache or CDN holding a stale copy is the most common reason a sitemap looks wrong.
  6. Only run one sitemap. If you switch SEO plugins, remove the old plugin's sitemap from Search Console and submit the new one.

How to check the fix

Open the sitemap URL in a browser and confirm it shows XML, not a web page, and lists your child sitemaps or URLs. Open a child sitemap and check that important pages are listed and noindexed pages are not. Load /robots.txt and confirm the Sitemap: line. In Search Console, the Sitemaps report should show a success status and a count of discovered URLs. Rerun the free SEO audit to confirm it is found.

Common questions

Does WordPress have a built-in sitemap?

Yes. Since WordPress 5.5, core generates one at /wp-sitemap.xml, unless an SEO plugin replaces it, it is disabled by a filter, or the site discourages search engines.

Do small sites need an XML sitemap?

They can be crawled fine without one if pages are well linked. A sitemap still speeds up discovery and gives you Search Console's indexing reports, and it costs nothing to keep.

Should noindexed pages be in the sitemap?

No. Listing URLs you tell Google not to index sends mixed signals. Include only canonical, indexable pages.

Where should the sitemap be listed?

In robots.txt with a Sitemap: line, which any crawler can read, and in Google Search Console, which gives you reports.