Sitemap errors: fix common XML sitemap problems
Short answer Open the Sitemaps report in Google Search Console and click the sitemap. Couldn't fetch means Google never got the file: check the address, robots.txt, your server and manual actions. Has errors means Google read the file but some lines are wrong. Fix the file, then resubmit it. Google retries failed sitemaps for only a few days.
Want help applying this to your business? Talk it through on a free 30-minute call.
Book a callWhat do the sitemap statuses in Search Console mean?
The Sitemaps report shows one of three statuses for the last time Google tried to read each sitemap you submitted. Click the row to see the details and the exact error name.
| Status | What happened | What Google does with your pages |
|---|---|---|
| Success | Google fetched and read the file with no errors | Every URL in it is queued for crawling |
| Has errors (or "Sitemap had X errors") | Google got the file but some parts didn't parse | URLs it could read are still queued; the broken ones are skipped |
| Couldn't fetch | Google couldn't download the file at all | Nothing from this attempt is used |
Two things to know before you fix anything:
- Google stops trying. If a fetch keeps failing, Google retries "for a few days" and then gives up, so you must fix the problem and resubmit (Search Console Help: Sitemaps report).
- Success is not indexing. The "Discovered pages" number counts URLs Google read from the file. Google says there is "no guarantee" those pages have been or will be crawled or indexed. To see what got indexed, filter the Page indexing report by that sitemap.
Do I need to fix a sitemap error at all?
Often not urgently. Google's help says a site of about 500 pages or fewer, where every page is reachable through links from the home page, probably doesn't need a sitemap. It also says hosted builders such as Squarespace and Wix "probably manage your sitemap for you." On those platforms, look up the builder's own sitemap help instead of editing the file.
Fix it when your site is larger, when new pages aren't being found, or after a redesign changed your page addresses.
How do I fix "Couldn't fetch"?
It means Google never got the file. Google lists these causes:
| Cause | How to check | Fix |
|---|---|---|
| Wrong address (a 404 error, meaning "page not found") | Paste the sitemap address into your browser | Submit the exact address that loads |
| Blocked by robots.txt | Open yourdomain.com/robots.txt and look for a Disallow rule covering the sitemap | Remove that rule; Google obeys robots.txt even for sitemaps |
| Unresolved manual action | Open the Manual actions report in Search Console | Fix the issue, then resubmit; Google doesn't read sitemaps while a manual action stands |
| Server down or slow | Try again later; ask your host about outages | Often temporary; wait and see if later attempts succeed |
| Low crawl demand | Nothing to test directly | Google ties crawl demand to content quality |
To see the real reason, test the sitemap like a page:
- Copy the sitemap address from the report's details page.
- Paste it into the URL Inspection box at the top of Search Console and press Enter.
- Click Live test, then open Page availability.
- You want "Crawl allowed?" to say Yes and "Page fetch" to say Successful. Whatever isn't green is your problem.
A login wall also blocks Google. Google says the sitemap "must not be blocked by any login requirements" (Search Console Help: Sitemaps report). Password-protected staging sites and security plugins that challenge bots are common culprits.
What do the "has errors" messages mean?
Google got the file, but some lines are wrong. The details page names each error and often the line number. These are the ones a small business site usually hits.
| Error | What it means | Fix |
|---|---|---|
| URL not allowed | The sitemap lists pages on another domain, or in a folder above the sitemap's own folder | Keep every URL on the same domain, and put the sitemap at the site root |
| Path mismatch: missing www / includes www | The sitemap address and the URLs in it disagree on "www" | Make them match: all with www or all without |
| Invalid URL | A URL has spaces, quotes or a typo such as "htp://" | Use complete, correctly typed addresses |
| Parsing error | Google couldn't read the XML, often because of an unescaped character such as & in a URL | Write & as & (the XML escape); special characters need escape codes |
| Invalid date | A lastmod date isn't in the W3C format | Use 2026-11-16, or a full time with a time zone |
| Unsupported format / Incorrect namespace | The file's header line is wrong or has curly quotes | Use the standard header with straight quotes; don't edit sitemaps in Word |
| Too many URLs / file size error | Over 50,000 URLs, or over 50MB uncompressed | Split into several sitemaps and list them in a sitemap index file |
| Nested sitemap indexes | A sitemap index lists another sitemap index | An index may list only regular sitemaps |
| Invalid URL in sitemap index file: incomplete URL | The index lists child sitemaps without full addresses | Give each child sitemap its full https:// address |
| Empty sitemap | The file has no URLs | Check the plugin or builder actually wrote the pages in |
| HTTP error (with a code, such as 404) | Google got an error page instead of the file | Confirm the address is right and the file exists |
| Temporary error | A problem on Google's side | Usually no action; resubmit only if it lasts several hours |
| Leading whitespace | Blank space before the first line of the file | Harmless; remove it to clear the message |
Those size limits apply to every sitemap format: "All formats limit a single sitemap to 50MB (uncompressed) or 50,000 URLs." (Google Search Central: Build and submit a sitemap). Few small business sites come close.
"Sitemap contains URLs which are blocked by robots.txt": what now?
Your sitemap asks Google to crawl pages your robots.txt file tells it not to visit. Those two instructions contradict each other.
- Run URL Inspection on one of the listed URLs to see which robots.txt rule blocks it.
- Decide what you want. If the page should be in Google, remove or narrow the rule. If it shouldn't, take it out of the sitemap.
Google's sitemap guide says to include "the URLs in your sitemap that you want to see in Google's search results." Leftover rules from a staging site, such as one that blocks the whole site, are a frequent cause after a launch.
"URLs not accessible" or "URLs not followed"
These are about the pages inside the sitemap, not the file.
- Not accessible: Google got an error when it tried one of the listed pages. Run URL Inspection on it.
- Not followed: usually redirects. Google asks you to replace redirecting URLs with "the URLs that should actually be crawled", to use permanent redirects, and to avoid JavaScript or meta-refresh redirects. Relative addresses (like "mypage.html" instead of the full https:// address) can cause it too.
After a redesign, an old sitemap full of redirecting addresses is the usual source.
Why isn't my sitemap listed in the report?
Two reasons, per Google:
- It's under another property. A sitemap submitted for http://example.com won't show in the report for https://example.com or http://m.example.com. Check you're looking at the right property.
- You never submitted it there. The report shows only sitemaps submitted in the report or through its API. One Google found through your robots.txt file can still be used, but won't be listed.
You need owner permission on the property to submit. Without it, add a line such as `Sitemap: https://example.com/sitemap.xml` to robots.txt; Google finds it on its next robots.txt visit.
How do I resubmit after fixing it?
- Load the sitemap address in your browser and confirm the fix is live.
- In the Sitemaps report, type the same address in Add a new sitemap and click Submit. This sends a new request.
- Check back for the new status. Google says the sitemap "should be fetched immediately", but crawling the pages in it takes longer, and not every URL may be crawled.
Deleting a sitemap from the report doesn't make Google forget it or its URLs. To stop Google visiting those pages, use robots.txt, delete the pages, or mark them noindex.
Example
A plumber with a moved sitemap
A plumber's site moved from one plugin to another, and the sitemap address changed from /sitemap.xml to /sitemap_index.xml. Search Console still checks the old one and shows Couldn't fetch, with a 404. Submitting the new address fixes it; the old row can be removed.
A clinic with "Path mismatch"
A clinic's sitemap lives at https://www.example-clinic.com/sitemap.xml, but its 60 URLs were typed without "www." Google flags Path mismatch: includes www. Regenerating the sitemap so all 60 URLs use www clears the error.
A store after launch
A new online store shows "Sitemap contains URLs which are blocked by robots.txt" for 300 product pages. The developer left a staging rule that blocks the whole site. Removing it and resubmitting lets Google read the products.
FAQ
How long does it take for "Couldn't fetch" to clear?
Google tries to fetch a sitemap as soon as you submit it, so a fixed file usually shows a new status soon after resubmitting. If the error stays, run a live URL Inspection test on the sitemap address.
Do sitemap errors hurt my rankings?
Google doesn't say they do. A broken sitemap only removes one way Google discovers pages. Pages linked from your menu and home page can still be found and indexed.
My sitemap shows Success but pages aren't indexed. Why?
A sitemap is "merely a hint," Google says; it doesn't guarantee crawling or indexing. Filter the Page indexing report by the sitemap to see the reason for each unindexed page.
Do I have to resubmit every time I add a page?
No. Once Google reads a sitemap successfully, it rechecks it on its own schedule. Resubmit after a fix or a big change.
Different for you?
- New to Search Console? Start with Google Search Console for a small business.
- Sitemap fine but pages "Discovered" or "Crawled - currently not indexed"? See crawled or discovered, currently not indexed.
- "Couldn't fetch" because of a manual action? Read Google manual action: find it, fix it and ask for review.
- Errors started after a rebuild? See why traffic dropped after a website redesign.
- Whole site missing from Google? Work through website not showing up on Google.
- Want someone to keep the sitemap and indexing right? See SEO.