Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Sitemap broken or listing dead URLs: how to find and fix it

OPS-099Low impactCould addBy FunnelGuardPublished Updated
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.

How a dead sitemap slows down new pages
  1. Sitemap fetchedSearch engine reads /sitemap.xml
  2. Dead URLs listed404s, redirects and noindex pages
  3. Crawl time wastedRequests spent on pages that cannot be indexed
  4. 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

Check your sitemap in about 10 minutes
  1. 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.

  2. 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.

  3. 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.

  4. 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.

What each symptom usually means
SymptomLikely cause
Sitemap returns 404Plugin disabled, file deleted, or a rewrite rule missing after a migration
Search Console: Couldn't fetchBlocked by robots.txt, server error, or a security rule
Listed URLs return 404Pages deleted but sitemap file is static or cached
Listed URLs redirectOld URLs after a slug or domain change
Listed URLs are noindexPages set to noindex but still included in the sitemap
Staging domain URLs insideSitemap 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.

Fix the sitemap on your platform
  1. 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.

  2. 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.

  3. 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.

  4. Clear caches

    Purge your caching plugin and any CDN so the old sitemap is not served.

Declare the sitemap in robots.txttext
User-agent: *
Allow: /

Sitemap: https://www.example.com/sitemap.xml
Sitemap before and after cleanup

Broken 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

Confirmation checklist
  • 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

Prevention habits
  • 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.

How a sitemap goes stale
  1. Month 0

    Site launches with a correct sitemap.

  2. Month 3

    Old campaign pages are deleted; the sitemap still lists them.

  3. Month 6

    URLs are renamed; the sitemap lists redirecting addresses.

  4. Month 7

    Search Console shows errors and excluded pages.

  5. 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.

Does FunnelGuard catch this?

Could add

Not checked yet: could be added to FunnelGuard.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.