thoughtasylumTOOLBOX Preview Guides Use offline Automate Feedback

Guides › Web

Fixing sitemap errors

Google Search Console or Bing Webmaster Tools says your sitemap “couldn’t be read”, “has errors”, or lists fewer pages than it should. A sitemap is a plain XML file, and one stray character or a date in the wrong form is enough. These tools check the file you paste or open, in your browser; none of them fetch your site.

1. Make sure it’s well-formed XML

If the search engine can’t read the sitemap at all, the XML itself is usually broken. Open the file in the Data Validator with Format set to XML: it points to the line and column of the first problem. The usual culprit is an address with a query, such as ?a=1&b=2, where every & must be written &amp;. Others are a <url> that’s never closed, and anything before <?xml at the very start of the file, even a blank line.

2. Check the entries

Paste or open the sitemap (a .xml.gz is fine) in the Sitemap Inspector. It says whether it’s a sitemap or a sitemap index and lists every entry, with the problems grouped above:

  • Addresses that aren’t full, such as /about instead of https://www.example.com/about.
  • Other hosts, or a mix of http:// and https://. List each page exactly as the site serves it, after any redirect, on the host the sitemap belongs to.
  • Dates in the wrong form. <lastmod> takes 2026-10-14, or a date and time with its time zone (2026-10-14T09:30:00+01:00); 14/10/2026 and a time with no zone are errors.
  • The same address twice, which a generator often produces for pages in two categories.
  • Over 50,000 entries or 50 MB. Split the sitemap into several and list them in a sitemap index.

Google ignores <changefreq> and <priority>, so there’s no need to fix those; an accurate <lastmod> is what it uses.

3. Let crawlers reach it

Paste the site’s robots.txt into the robots.txt Tester with Googlebot chosen, and list the sitemap’s own address and a few of the pages in it. Each should be Allowed: a sitemap listing pages that robots.txt blocks is flagged in Search Console. Its Sitemap: line, if there is one, must be the full address, and the tester warns when it isn’t.

4. “Couldn’t fetch”

When the file is fine but can’t be fetched, check what the server sends. Open the sitemap’s address with the browser’s developer tools on the Network tab, or run curl -I https://www.example.com/sitemap.xml: the status should be 200. A 301 means the sitemap moved (submit the new address), 403 or 401 that the server or a firewall turns crawlers away, and 404 that the address is wrong. HTTP Codes & MIME Types explains any other code, and the content type to expect for .xml.

After a site move, Moving a website without losing visitors uses the Sitemap Inspector to compare the old and new sitemaps.

All 62 guides, grouped by what they help with.

Saved you a few minutes? Say thanks with a coffee.

Something wrong or unclear in this guide? Report it or suggest a guide.

↑ ↓ move↵ openesc close