On this page
What this issue is
An XML sitemap is a file that lists the pages you want search engines to find. It normally lives at /sitemap.xml or /sitemap_index.xml. When search engines request it, the server should answer with status 200 and XML content.
This issue means it answers with something else. A 404 says the file does not exist at that address. A 5xx (500, 502, 503, 504) says the server failed while building or serving it. Both leave crawlers with nothing to read.
| Status | Meaning | Common cause |
|---|---|---|
| 404 | File not found | Sitemap plugin off, permalinks not refreshed, wrong URL, file deleted in a migration |
| 500 | Server error | PHP error, memory limit, plugin conflict, huge sitemap timing out |
| 502 / 504 | Gateway or timeout | Slow sitemap generation behind a proxy or CDN |
| 503 | Service unavailable | Overloaded server, maintenance mode, rate limiting |
Why it costs you leads or sales
Search engines can still find pages through links, so a broken sitemap rarely removes you from results overnight. The damage is slower. New landing pages, product pages and offers are discovered later, and updated pages are re-crawled less promptly. Search Console also shows the sitemap as failed, which hides useful indexing reports.
The risk is higher on large sites, new sites with few inbound links, and sites that publish often. If your campaigns send traffic to new pages that are not yet indexed, you lose organic leads for those pages in the meantime.
- You publish a pageNew landing or product page goes live
- Crawler fetches sitemapGets a 404 or 5xx
- Page discoveredOnly if a link leads to it
- Page indexedDelayed
- Organic leadArrives later or not at all
The break is at the sitemap fetch; later steps happen slowly or not at all.
Example: illustrative numbers only. Real timing varies by site and is never guaranteed.
How to check if your site has it
Open the sitemap in a browser
Visit yourdomain.com/sitemap.xml, then /sitemap_index.xml (Yoast, Rank Math) and /wp-sitemap.xml (WordPress core). You should see XML or a list of child sitemaps, not an error page.
Check the status code
Run the curl command below. Look for HTTP 200 and a content-type containing xml.
Read Search Console
Go to Indexing > Sitemaps. A status of 'Couldn't fetch' or 'Has errors' with HTTP 404 or 5xx confirms the problem.
Check robots.txt
Open yourdomain.com/robots.txt and see which sitemap URL it lists. Make sure that exact URL works.
Test as a crawler
Request the sitemap with the Googlebot user agent. A firewall or security plugin may block bots while letting you through.
curl -sI https://www.example.com/sitemap.xml | head -n 10
# Follow redirects and show the final status
curl -sIL -o /dev/null -w "%{http_code} %{content_type} %{url_effective}\n" https://www.example.com/sitemap.xmlHow to fix it
Work out first whether you have a 404 or a 5xx, then use the tab for your platform. The cause depends on how your site makes its sitemap.
Refresh permalinks
Go to Settings > Permalinks and click Save Changes without altering anything. This rewrites rules and often clears a 404 on sitemap URLs.
Check the sitemap feature is on
In Yoast SEO: Settings > Site features > XML sitemaps. In Rank Math: Sitemap Settings. Make sure only one plugin makes a sitemap.
Look for a physical file
An old static sitemap.xml in the site root can override the plugin and return stale or broken output. Delete it if a plugin handles your sitemap.
Debug a 500
Turn on WP_DEBUG_LOG in wp-config.php, reload the sitemap and read wp-content/debug.log. Deactivate plugins one by one to find a conflict, and raise the PHP memory limit if the log shows memory errors.
Check caching and security plugins
Exclude sitemap URLs from page caching, and make sure a firewall plugin is not blocking crawlers.
Use the built-in path
Shopify creates /sitemap.xml automatically. You cannot edit or delete it. Check the exact URL on your primary domain.
Check the domain
In Settings > Domains, confirm your primary domain. Request the sitemap on that domain, not an old or redirected one.
Check redirects
In Online Store > Navigation > URL redirects, delete any redirect from /sitemap.xml.
Check the store is public
A password-protected store returns a password page to crawlers. Remove the storefront password under Online Store > Preferences when you launch.
Enable auto-generate
Go to Site settings > SEO > Sitemap and turn on Auto-generate sitemap, then publish the site.
Publish to the live domain
The sitemap is only served on published domains. Publish to your custom domain, not just the webflow.io staging address.
Remove a custom file or redirect
If you set a 301 redirect for /sitemap.xml, remove it under Site settings > Publishing > 301 redirects.
Use the automatic sitemap
Wix creates /sitemap.xml for you. Open it on your connected domain.
Check the domain connection
In Settings > Domains, make sure the domain is connected and set as primary.
Remove a redirect
In Marketing & SEO > SEO Tools > URL Redirect Manager, remove any rule for /sitemap.xml.
Use the automatic sitemap
Squarespace serves /sitemap.xml itself. Open it on your live domain.
Check site visibility
If the site is password protected or not public, crawlers cannot reach it. Review the setting under Pages > Site availability or Settings > Site availability, depending on your version.
Check URL mappings
In Settings > Developer Tools > URL Mappings, remove any rule that touches /sitemap.xml.
Confirm the file or route exists
Static sites need sitemap.xml in the web root. Framework sites need a route or build step that outputs it. Redeploy and check it is in the deployed output.
Fix server rules
Check that Nginx or Apache rewrite rules, a catch-all route or an SPA fallback is not swallowing the sitemap URL.
Read the server error log
For a 5xx, find the error in the application or server log. Common causes are database timeouts, memory limits and unhandled exceptions in the generator.
Cache the output
If generating the sitemap is slow, build it on a schedule and serve the stored file. Split very large sitemaps into an index with child files.
location = /sitemap.xml {
try_files $uri =404;
default_type application/xml;
}How to confirm it's fixed
- The sitemap URL returns HTTP 200 in curl, with no long redirect chain.
- The content type is XML and the file opens with a urlset or sitemapindex tag.
- Every child sitemap in an index also returns 200.
- robots.txt lists the working sitemap URL.
- In Search Console > Indexing > Sitemaps, you resubmitted the sitemap and the status reads Success.
- Bing Webmaster Tools shows the sitemap as processed.
Search Console may take a few hours or days to re-read the sitemap. If the status stays on an old error, resubmit it and check again later.
How to prevent it happening again
- Re-test the sitemap after every migration, domain change, theme change and plugin update.
- Keep only one tool generating your sitemap.
- Exclude sitemap URLs from caching rules that could serve errors, and test them after changing CDN or firewall settings.
- Add the sitemap URL to an uptime monitor that checks for status 200.
- Check Search Console's Sitemaps report monthly, and turn on its email notifications.
Day 0
A plugin update or migration breaks /sitemap.xml. It returns 404.
Week 1
New pages are published. Crawlers fetch the sitemap and fail.
Week 3
Search Console shows 'Couldn't fetch'. Nobody reads the email.
Week 6
You notice new pages are not indexed and fix the sitemap.
How FunnelGuard handles this
FunnelGuard does not check sitemaps yet. A sitemap status check is a possible future addition, but today it is not part of the product.
What FunnelGuard does cover is the customer journey on your site: a robot visitor runs your lead forms, checkouts, and booking and chat buttons on a schedule, checks the tracking hits sent to ad and analytics platforms, and confirms test leads reach your inbox and CRM. That helps you find breakage that affects conversions once visitors arrive, but not whether search engines can read your sitemap.
To watch for sitemap errors yourself, use the Sitemaps report in Google Search Console and Bing Webmaster Tools with email notifications on, and add your sitemap URL to a general uptime monitor that expects a 200 status. You can also run the curl command above after each release. A free read-only FunnelGuard website audit is available if you want a wider look at your site.
The crawler requests the sitemap, the server answers with an error, and no page list is read.
Questions people ask
Why is my sitemap.xml returning a 404?
The file or route does not exist at that URL. Common causes are a sitemap plugin switched off, permalinks needing a refresh, a deleted file after a migration, or a redirect or rewrite rule catching the URL. Check which URL your platform actually uses, as it may be /sitemap_index.xml or /wp-sitemap.xml.
Why does Google Search Console say 'Couldn't fetch' for my sitemap?
Google requested the sitemap and could not read it. The usual reasons are a 404, a 5xx server error, a block by a firewall, or a redirect to a non-XML page. Open the URL yourself, check the status with curl, fix the cause and resubmit.
How do I fix a sitemap that returns a 500 error?
A 500 means the server failed while building the file. Read the error log, then look for a plugin conflict, a PHP memory limit or a timeout caused by a very large sitemap. On WordPress, enable WP_DEBUG_LOG and deactivate plugins one at a time.
Does a broken sitemap hurt my SEO rankings?
It does not directly lower rankings, but it can slow discovery and re-crawling of your pages. The effect is bigger for new, large or frequently updated sites. Pages with good internal links can still be found without it.
How do I fix sitemap_index.xml 404 on WordPress?
Go to Settings > Permalinks and click Save Changes to refresh the rewrite rules. Then confirm your SEO plugin has XML sitemaps enabled and that no other plugin or static sitemap.xml file is conflicting. Clear any page cache and test again.
How long until Google re-reads my sitemap after I fix it?
It can take from a few hours to a few days. Resubmit the sitemap in Search Console under Indexing > Sitemaps to prompt a new fetch. Do not delete and re-add it repeatedly.
Can a firewall or CDN cause my sitemap to return an error?
Yes. A security plugin, CDN rule or rate limit can return 403, 503 or a challenge page to crawlers while the sitemap loads fine for you. Test with a Googlebot user agent and allow legitimate search crawlers in your own settings.
Does FunnelGuard monitor my sitemap?
No. FunnelGuard does not check sitemaps yet; it runs your customer journeys such as forms and checkouts and checks tracking and lead delivery. For sitemaps, use Search Console, Bing Webmaster Tools or an uptime monitor.
Related issues
- SEO-099No XML sitemapFix guide
- SEO-100Sitemap not referenced in robots.txtFix guide
- SEO-101Sitemap not submitted in Search Console / Bing WebmasterFix guide
- SEO-103Sitemap XML invalid or wrong namespaceFix guide
- SEO-112Sitemap index references dead child sitemapsFix guide
- SEO-113Plugin generates duplicate sitemaps (Yoast plus Rank Math)Fix guide