How to Fix a Missing XML Sitemap (and Get It Found)

Your audit could not find an XML sitemap at /sitemap.xml or in a Sitemap: line in robots.txt, or the sitemap it found listed zero URLs. By the end of this guide you will have a valid sitemap of your indexable pages, published where crawlers look for it, referenced in robots.txt and submitted to Google and Bing.

By Updated ⏱ 20 minutes🎯 Beginner● High impactTechnical
Illustration: XML sitemap present fix guide
TECHNICAL · FIX GUIDE XML sitemap present IMPACTEFFORT TIME20 minutes LEVELBeginner

Why it matters

A sitemap is the most direct way to tell search engines which URLs exist and when they changed. Without one, Google and Bing rely only on following links, so new, deep or poorly linked pages (product variants, older blog posts, landing pages) can take weeks to be discovered or are never indexed. AI search features built on Bing and Google indexes can only cite pages that are indexed.

Search Console's sitemap report is also how you see which submitted URLs were indexed and which were rejected, so missing it removes a key diagnostic.

✕Beforehttps://example.com/sitemap.xmlreturns 404 and robots.txt has noSitemap: line.✓Afterhttps://example.com/sitemap.xmlreturns 200 with 148 <url> entries,robots.txt contains 'Sitemap:

What you need

Admin access to your CMS or the ability to upload files to the site root
Access to edit robots.txt
A verified Google Search Console property (Bing Webmaster Tools optional)
A list or crawl of your indexable, canonical URLs

Step-by-step fix

1

Check whether a sitemap already exists

Many platforms generate a sitemap automatically but at a path crawlers don't guess. Open these URLs in a browser and note any that return XML:

  • https://example.com/sitemap.xml
  • https://example.com/sitemap_index.xml (Yoast, Rank Math)
  • https://example.com/wp-sitemap.xml (WordPress core)
  • https://example.com/robots.txt (look for a Sitemap: line)

If one exists but isn't at /sitemap.xml and isn't in robots.txt, skip to step 5.

text
curl -sI https://example.com/sitemap.xml
curl -s https://example.com/robots.txt | grep -i sitemap
Pro tip: A sitemap that loads but contains no <url> or <sitemap> entries counts as missing. Check that it actually lists pages.
2

Generate the sitemap

Use your platform's built-in generator where possible (see platform notes) so it updates automatically when you publish. On a static or custom site, either generate it in your build/framework or crawl the site with a tool such as Screaming Frog (Sitemaps > XML Sitemap) and export the file. The minimal valid format is a <urlset> with one <url><loc> per page.

html
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/</loc>
    <lastmod>2026-01-15</lastmod>
  </url>
  <url>
    <loc>https://example.com/pricing</loc>
    <lastmod>2026-01-10</lastmod>
  </url>
</urlset>
Pro tip: Google ignores <priority> and <changefreq>. Spend effort on accurate <lastmod> dates instead.
3

List only indexable, canonical URLs

Every URL in the sitemap should return 200, be self-canonical and not carry a noindex tag. Remove redirects, 404s, parameter/filter URLs, internal search results, cart and account pages, and staging hostnames. Use absolute URLs on your preferred protocol and host (https, www or non-www, consistently).

Pro tip: A sitemap full of redirects and noindexed URLs teaches Google to trust it less. Keep it clean rather than exhaustive.
4

Split large sites with a sitemap index

One sitemap file may hold at most 50,000 URLs and 50 MB uncompressed. Larger sites should split by type (pages, posts, products) and list the files in a sitemap index at /sitemap.xml. Make sure each child sitemap actually contains URLs.

html
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap><loc>https://example.com/sitemap-pages.xml</loc></sitemap>
  <sitemap><loc>https://example.com/sitemap-products.xml</loc></sitemap>
</sitemapindex>
5

Publish it and reference it in robots.txt

xml, returning HTTP 200 with Content-Type application/xml or text/xml. txt. xml.

txt does not Disallow the sitemap path.

text
User-agent: *
Disallow: /cart

Sitemap: https://example.com/sitemap.xml
Pro tip: You can list several Sitemap: lines, one per file or index.
6

Submit it in Google Search Console and Bing

In Google Search Console, open your property and go to Indexing > Sitemaps. Under "Add a new sitemap" enter the path (for example sitemap.xml) and click Submit. In Bing Webmaster Tools, go to Sitemaps > Submit sitemap and paste the full URL; Bing also feeds several AI assistants.

Pro tip: Submitting the index file is enough; Google discovers the child sitemaps from it.
7

Confirm the sitemap is found and processed

Fetch the sitemap and robots.txt from the command line to confirm a 200 status, XML content type and a non-zero URL count. After a few hours to a few days, Search Console's Sitemaps report should show Status "Success" and a "Discovered pages" count. Re-run the audit to confirm the check passes.

text
curl -sI https://example.com/sitemap.xml | grep -iE 'HTTP/|content-type'
curl -s https://example.com/sitemap.xml | grep -c '<loc>'
Pro tip: If Search Console shows "Couldn't fetch", check for firewall/bot protection rules blocking Googlebot on the XML file.

Platform-specific notes

WordPress

WordPress 5.5+ generates https://example.com/wp-sitemap.xml automatically; Yoast SEO and Rank Math disable it and serve https://example.com/sitemap_index.xml instead (Yoast: Yoast SEO > Settings > Site features > XML sitemaps). Neither lives at /sitemap.xml, so confirm robots.txt contains the Sitemap: line. WordPress adds it to its virtual robots.txt, but a physical robots.txt file in the web root overrides that, so add the line manually if you have one. Also check Settings > Reading > 'Discourage search engines' is unticked, or the core sitemap is disabled.

Shopify

Shopify auto-generates https://example.com/sitemap.xml as an index of products, collections, pages and blog sitemaps, and you cannot upload or replace it. It is listed in the default robots.txt. If it seems missing, check the store isn't password-protected (Online Store > Preferences) and submit it on your primary domain, not the .myshopify.com URL.

Wix

Wix creates https://example.com/sitemap.xml automatically once the site is published on a connected domain. Pages hidden from search via Page settings > SEO basics ('Let search engines index this page' off) are excluded. Submit it through Search Console or Wix's SEO Setup Checklist Google connection.

Webflow

Go to Site settings > SEO > Sitemap, turn on 'Auto-generate sitemap' and republish; it appears at /sitemap.xml. Exclude individual pages with the page setting 'Exclude this page from site search' plus a noindex, or CMS items via the collection's sitemap toggle.

Next.js

With the App Router, add app/sitemap.ts exporting a default function that returns an array of { url, lastModified } objects (fetch slugs from your CMS for dynamic routes); Next.js serves it at /sitemap.xml. For more than 50,000 URLs use generateSitemaps(). Add app/robots.ts returning { rules: [...], sitemap: 'https://example.com/sitemap.xml' } so robots.txt references it. On the Pages Router, use the next-sitemap package in a postbuild script.

Check that it worked

✅ How to verify

  • Open https://example.com/sitemap.xml (or the URL in your robots.txt Sitemap: line) and confirm it loads as XML with at least one <loc> entry.
  • Run curl -s https://example.com/robots.txt and confirm a Sitemap: line with an absolute https URL is present.
  • Check Google Search Console > Indexing > Sitemaps shows Status 'Success' and a non-zero Discovered pages count.
  • Re-run the audit and confirm it reports 'Sitemap found with N URLs'.

⚠️ Common mistakes

  • Leaving the sitemap at a non-standard path (such as /wp-sitemap.xml or /sitemap_index.xml) without adding a Sitemap: line to robots.txt, so crawlers never find it.
  • Listing redirected, noindexed, canonicalised-away or 404 URLs, or using http:// and staging-domain URLs that don't match the live canonical host.
  • Blocking the sitemap with robots.txt Disallow rules, password protection or a WAF/bot-protection rule that challenges Googlebot.
  • Uploading a static sitemap once and never updating it, so new pages are missing and lastmod dates are wrong.

Is this still an issue on your site? Run a free audit — ZORO checks this and 294 other SEO, AI-visibility, accessibility and security signals, with fixes for your platform.

Check my site free

FAQ

Where should my XML sitemap be located?

Put it at the site root, ideally https://example.com/sitemap.xml, because that's where crawlers and audit tools look first. Any other path works as long as you reference the full URL in robots.txt with a Sitemap: line and submit it in Search Console.

Do I still need a sitemap if my site is small?

Google says small, well-linked sites can be crawled without one, but a sitemap costs minutes to set up, speeds up discovery of new pages and unlocks the Search Console sitemap report for spotting indexing problems. There is no downside to having one.

How often should I resubmit my sitemap to Google?

You only need to submit it once. Google refetches known sitemaps on its own schedule; keep the file updated automatically with accurate lastmod dates. Resubmit only if you change the sitemap URL.

Should every page on my site be in the sitemap?

No. Include only pages you want indexed: 200 status, self-canonical and not noindexed. Leave out filtered or parameter URLs, internal search, cart, login and thank-you pages.