How to Fix "Sitemap Could Not Be Read" in Search Console
'Couldn't fetch' or 'Sitemap could not be read' occurs when /sitemap.xml returns HTML instead of application/xml, sits behind an authentication redirect or WAF block, contains unescaped '&' entities, or exceeds 50,000 URLs without a <sitemapindex>.
Why Does This Issue Occur? (Symptom & Cause Matrix)
| Observed Symptom | Root Technical Cause | Recommended Fix |
|---|---|---|
| Sitemap URL returns HTML login page | Middleware blocks /sitemap.xml | Whitelist /sitemap.xml and /sitemaps/* for unauthenticated crawlers |
| XML syntax parse error | Unescaped & character inside <loc> URLs | Escape '&' as '&' or use dynamic Next.js sitemap.ts |
Step-by-Step Fix Checklist
- 1
Verify Raw XML Response & Content-Type
Fetch https://yourdomain.com/sitemap.xml directly and ensure it starts with <?xml version="1.0"?> with status HTTP 200.
- 2
Split Large Sites Over 5,000–50,000 URLs
Use a clean <sitemapindex> referencing modular /sitemaps/sitemap-1.xml files.
- 3
Declare Sitemap Inside robots.txt
Add Sitemap: https://yourdomain.com/sitemap.xml as the final line of robots.txt.
Valid XML Sitemap Root Structure
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://yourdomain.com/</loc>
<lastmod>2026-11-26T00:00:00.000Z</lastmod>
</url>
</urlset>People Also Ask About This Error
Why does Google Search Console say Couldn't Fetch on a valid XML file?
On brand-new properties, GSC sometimes displays Couldn't Fetch briefly while pending initial discovery—ensure HTTP 200 XML and wait 24h or inspect a single URL.
Is dynamic Next.js sitemap.ts better than static sitemap.xml?
Yes—sitemap.ts automatically prevents XML syntax errors and stays synced whenever you add programmatic pages.