On this page
What this issue is
An XML sitemap is a file that tells search engines which URLs on your site you want them to find. It sits at an address like https://example.com/sitemap.xml, or at an index file that points to several smaller sitemaps.
It can go wrong in two ways. The file itself can be broken: it returns a 404 or 500 error, is blocked, is not valid XML, or is too large. Or it can load fine but list dead URLs: pages that return 404, redirect elsewhere, are set to noindex, point to the wrong domain or the http version, or are old test pages.
Why it costs you leads or sales
A sitemap does not make pages rank, and Google can find pages without one. So the impact is usually low and indirect. But a messy sitemap sends search engines to dead ends and can make new landing pages, products and offers slower to be discovered and re-crawled. Google Search Console also reports these problems, which makes real issues harder to spot among the noise.
- Sitemap fetchedSearch engine reads /sitemap.xml
- Dead URLs listed404s, redirects and noindex pages
- Crawl time wastedRequests spent on pages that cannot be indexed
- New pages found lateOffers and landing pages indexed more slowly
Crawlers follow the sitemap, hit dead URLs, and your new pages are picked up later than they could be.
How to check if your site has it
Open the sitemap in a browser
Visit /sitemap.xml, /sitemap_index.xml (common with Yoast and Rank Math) and /wp-sitemap.xml (WordPress core). It should show XML, not a 404 or an error page. Check your robots.txt for a line starting with Sitemap: to see the declared address.
Check Google Search Console
Go to Indexing > Sitemaps. Look at the status of each sitemap: Success, Couldn't fetch, or Has errors. Then open Indexing > Pages and look for reasons such as 'Not found (404)', 'Page with redirect' and 'Excluded by noindex tag' on URLs that come from the sitemap.
Check the URLs inside
Export or copy the URL list and run it through a crawler such as Screaming Frog (list mode) or a similar tool. Look at status codes: anything other than 200 needs attention.
Check domain, protocol and canonicals
All URLs should use your live domain, https, and the same www or non-www version you use everywhere. Each listed page's canonical tag should point to itself.
| Symptom | Likely cause |
|---|---|
| Sitemap returns 404 | Plugin disabled, file deleted, or a rewrite rule missing after a migration |
| Search Console: Couldn't fetch | Blocked by robots.txt, server error, or a security rule |
| Listed URLs return 404 | Pages deleted but sitemap file is static or cached |
| Listed URLs redirect | Old URLs after a slug or domain change |
| Listed URLs are noindex | Pages set to noindex but still included in the sitemap |
| Staging domain URLs inside | Sitemap copied over from a test site |
How to fix it
The goal is a sitemap that is generated automatically and lists only pages that return 200, are indexable and use the final canonical address. The exact menu depends on your platform and theme.
Use one sitemap source
WordPress has a built-in sitemap at /wp-sitemap.xml. If you use Yoast SEO, Rank Math or similar, let that plugin provide it and turn off the other so you do not have two competing sitemaps.
Exclude noindex content
In your SEO plugin, set post types or pages you do not want indexed to noindex. Most plugins then drop them from the sitemap automatically. Check the plugin's sitemap settings for post types and taxonomies.
Fix a 404 sitemap
Go to Settings > Permalinks and click Save Changes without altering anything. This refreshes rewrite rules and often restores a missing sitemap.
Clear caches
Purge your caching plugin and any CDN so the old sitemap is not served.
Use the automatic sitemap
Shopify generates /sitemap.xml for you and you cannot edit it directly. Dead URLs usually mean a product or page was deleted or set to hidden; update or remove it in the admin.
Redirect removed products
Go to Online Store > Navigation > URL Redirects and redirect deleted product or collection URLs to a relevant live page.
Check primary domain
In Settings > Domains, make sure your primary domain is the one you want, so the sitemap lists it.
Enable the auto-generated sitemap
In Site settings > SEO, turn on Auto-generate sitemap, then publish the site. Webflow serves it at /sitemap.xml on your published domain.
Exclude pages
In each page's settings, switch on Exclude this page from the sitemap (and Hide from search results if it is a noindex page).
Set the default domain
In Hosting settings, set the correct default domain so URLs are not listed under the webflow.io address.
Rely on the automatic sitemap
Wix creates /sitemap.xml automatically. You cannot edit the file but you can control what it includes.
Hide pages from search
In the page's SEO settings, switch off Let search engines index this page so it is left out.
Redirect deleted pages
Use the Redirect Manager in the SEO tools to send old URLs to live pages.
Use the built-in sitemap
Squarespace builds /sitemap.xml automatically from your published pages.
Exclude pages
Open the page settings, go to the SEO tab and turn on Hide this page from search results. Disabled or not-linked pages are also handled by the platform.
Add URL mappings
Use Settings > Developer Tools > URL Mappings (Website > Pages > Utilities in some versions) to redirect removed URLs.
Check the funnel or website domain
Sitemaps are generated per connected domain. Confirm the domain is connected and the pages are published.
Review page SEO settings
Remove or unpublish pages you no longer use, and check the options for hiding pages from search engines. Exact options depend on your account version.
Generate the sitemap automatically
Build the sitemap from your database or router at request time, or regenerate it on every deploy. Hand-edited files go stale.
List only 200 pages
Filter out URLs that redirect, return 4xx or 5xx, or carry a noindex tag. Use absolute, canonical https URLs.
Serve it correctly
Return status 200 with the content type application/xml and keep each file under 50,000 URLs or 50 MB uncompressed, using a sitemap index if needed.
User-agent: *
Allow: /
Sitemap: https://www.example.com/sitemap.xmlBroken sitemap
- Static file last edited a year ago
- Lists deleted products (404) and old slugs (301)
- Includes noindex thank-you pages
- Some URLs use http or a staging domain
Clean sitemap
- Generated automatically by the platform or plugin
- Only live pages returning 200
- Noindex and thank-you pages excluded
- All URLs on the final https domain
How to confirm it's fixed
- The sitemap URL loads in a browser and shows valid XML
- robots.txt contains the correct Sitemap: line
- A crawler run over the listed URLs shows only 200 responses
- No listed page has a noindex tag or a canonical pointing elsewhere
- All URLs use the live domain and https
- In Search Console, the sitemap is resubmitted and shows Success
- Discovered URL count roughly matches the pages you expect
After you resubmit in Search Console (Indexing > Sitemaps), allow some days for the report to update. Google can be slow to refresh the numbers, so judge the fix by your own crawl first.
How to prevent it happening again
- Use an automatic sitemap, never a hand-edited file
- Add a sitemap check to your migration and redesign checklist
- Redirect every deleted or renamed page with a 301
- Set noindex on a page and exclude it from the sitemap in the same step
- Re-run a crawl of the sitemap URLs monthly or after big content changes
- Watch the Sitemaps and Pages reports in Search Console and turn on its email notifications
- Make sure staging sites are blocked and their sitemap is not copied to production
How FunnelGuard handles this
FunnelGuard does not check your sitemap yet. Sitemap monitoring is a possible future check, so today you need to watch for it another way.
What FunnelGuard does do is run your real customer journeys (lead forms, checkouts, booking and chat buttons) on a schedule and check each step, the tracking hits sent to ad and analytics platforms, and whether test leads reach your inbox and CRM. If a page in one of those journeys starts returning an error, that breaks the journey itself and shows up there. That covers pages your journeys use, not every URL in your sitemap.
Month 0
Site launches with a correct sitemap.
Month 3
Old campaign pages are deleted; the sitemap still lists them.
Month 6
URLs are renamed; the sitemap lists redirecting addresses.
Month 7
Search Console shows errors and excluded pages.
Month 7+
Sitemap regenerated and resubmitted; errors clear over days.
Questions people ask
Why is my sitemap.xml returning a 404?
The sitemap plugin may be disabled, the file may have been deleted, or rewrite rules may be missing after a migration. On WordPress, go to Settings > Permalinks and click Save Changes, and check which plugin or core feature is meant to generate it. On hosted builders, check that the automatic sitemap setting is on and the site is published.
Why does Google Search Console say 'Couldn't fetch' for my sitemap?
Google could not download the file. Common causes are a wrong URL, a 404 or 500 error, a robots.txt rule or security firewall blocking it, or invalid XML. Open the sitemap URL yourself, fix the error, then resubmit it in Indexing > Sitemaps.
Should a sitemap include redirected or noindex pages?
No. A sitemap should list only live, indexable pages that return 200 and use their own canonical URL. Redirected, noindex, 404 and duplicate URLs send mixed signals and waste crawl time.
How do I remove dead URLs from my sitemap?
Regenerate the sitemap from your platform or SEO plugin so it rebuilds from current pages, and clear caches. If a page was deleted on purpose, let it drop out or redirect it with a 301. Then resubmit the sitemap in Search Console.
Does a broken sitemap hurt my rankings?
Not directly. Google can find pages through links without a sitemap. But a broken or dirty sitemap can slow discovery of new pages and clutter your Search Console reports, so it is worth fixing, especially on larger sites.
How often should I update my sitemap?
It should update itself whenever you publish, change or delete pages. If yours is a static file, replace it with an automatic one. Check it manually after migrations and redesigns, and otherwise once a month.
Does FunnelGuard monitor my sitemap?
No, not yet. It is a possible future check. FunnelGuard currently runs your real customer journeys, such as lead forms and checkouts, so broken pages inside those paths show up there, but it does not scan your sitemap.
Related issues
- OPS-092Hosting migration left old server serving some trafficFix guide
- OPS-084Error display on (PHP warnings shown to visitors)Fix guide
- OPS-085Debug mode on in production (stack traces)Fix guide
- OPS-095Compression (gzip/brotli) disabledFix guide
- OPS-096HTTP/2 or HTTP/3 not enabledFix guide
- OPS-072Server out of disk space (uploads, sessions fail)Fix guide