Sitemap errors in Search Console: diagnose and fix each one
Sitemap errors in Search Console: match the exact message — could not be read, couldn't fetch, has errors, or missing from robots.txt — then fix the response.
Sitemap errors: match the exact message first
Search Console uses different labels for different failures, and the right fix depends on which one you see. “Sitemap could not be read” means the fetch failed. “Couldn't fetch” means Google could not retrieve the file at all. “Sitemap can be read, but has errors” means the file arrived but parsing or URL processing failed. A warning that the sitemap is not indicated in robots.txt comes from audit tools such as Lighthouse, not from the Sitemaps report.
Copy the exact submitted URL and the reported status before changing anything. The same address can look fine in your browser while Google's fetch fails, so start from evidence rather than from a redeploy.
| Message | What it means | First check |
|---|---|---|
| Sitemap could not be read | Google's fetch of the sitemap failed | The exact submitted URL and its HTTP response |
| Couldn't fetch | The request did not complete | DNS, TLS, timeouts, CDN rules, or bot protection |
| Sitemap can be read, but has errors | File fetched, processing or URL checks failed | XML root, invalid entries, encoding, and file size |
| Sitemap not indicated in robots.txt | An audit warning, not a fetch failure | Whether a Sitemap line exists and points at the right URL |
Sitemap could not be read: diagnose the fetch
Open the sitemap row, expand the error details, and copy the exact submitted URL. Then run Search Console's live URL inspection on that same URL and check whether the page fetch succeeds. Confirm that you are in the property for the right protocol and hostname; the report only shows sitemaps submitted for the current property. A successful request from your browser alone does not prove Google's fetch worked.
A route may also appear in a sitemap without a trailing slash, redirect to a slash version, and have a canonical tag pointing somewhere else. Keep the intended URL consistent across internal links, canonicals, sitemap entries, and redirects.
curl -I https://example.com/pricing
curl -I https://example.com/pricing/
curl -s https://example.com/sitemap.xmlSitemap can be read, but has errors: inspect the XML
This status means the download succeeded, so stop looking at status codes and read the file Google received. Common causes are an HTML shell served at the sitemap address, malformed or unescaped XML, a wrong root element, relative URLs, entries that return 404 or redirect, oversized files, and unsupported encodings.
Parse the response with an XML parser instead of trusting how a browser renders it, then sample the listed URLs and confirm each one returns a single canonical page without a redirect chain. Google's build-sitemap documentation lists the supported formats and limits.
- Root element is urlset or sitemapindex, not html.
- Every loc is absolute and returns 200 without a redirect.
- Entities such as & are escaped, and the encoding is UTF-8.
- No login, dashboard, API, or parameter-only URLs.
- Child sitemaps in an index all load individually.
Sitemap not indicated in robots.txt: decide whether to declare it
This wording is an audit warning, not a Search Console fetch error. A Sitemap line in robots.txt is optional, but it gives crawlers one more place to find the file. If you add it, point at the final HTTPS origin and keep the line outside any user-agent group that does not apply to crawlers.
- robots.txt returns 200 with a text/plain content type.
- No Disallow: / unless you intentionally want a private site.
- Sitemap URL uses the final HTTPS origin, not a staging host.
- The same sitemap URL is the one submitted in Search Console.
Sitemap: https://example.com/sitemap.xmlMap the observed response to the likely cause
Once you have the exact URL and its response, match the symptom to the layer that produced it. Changing the sitemap file will not fix a CDN challenge, and loosening a CDN rule will not fix malformed XML.
| Observed response | Likely area to inspect | Next action |
|---|---|---|
| 404 or redirect to an unrelated route | Endpoint and rewrite rules | Correct the submitted URL or the deployed file route |
| 401, 403, or CDN challenge | Authentication and bot protection | Inspect server logs and allow verified crawler access to public XML |
| 5xx or timeout | Origin reliability | Fix the endpoint and check that retries receive the complete body |
| 200 with an HTML document | SPA fallback, login page, or wrong URL | Serve XML at that address; an HTTP 200 alone is insufficient |
| XML parsing error | Generated XML | Repair escaping, malformed tags, or invalid structure |
| Index loads, one child fails | Child sitemap publication | Repair the failing child and check all listed child endpoints |
Fix the sitemap at the source
Every loc should be absolute, public, and reachable. Remove login, dashboard, API, and parameter-only URLs. If a route intentionally redirects, place the final URL in the sitemap instead. Validate XML syntax and sample several URLs with HEAD or GET requests before submitting the file.
Fix a specific sitemap message
Each guide below handles one status from the Sitemaps report, so you can stop at the layer that actually failed.
Your sitemap appears to be an HTML page
Fetch the response body as well as its headers. A route can return the website's ordinary HTML shell with status 200 when a sitemap file is missing. A human-facing sitemap page is also different from an XML sitemap endpoint. Find the actual generated XML and use its public address.
curl -L -D sitemap-headers.txt https://example.com/sitemap.xml -o sitemap-body.txt
# Expected XML root: <urlset ...> or <sitemapindex ...>
# Investigate an HTML root, login form, or challenge document.Confirm crawler access, then review page indexing separately
A request with a Googlebot user-agent string is not proof that verified Googlebot can reach the file. Use Search Console's live inspection and verified crawler logs when diagnosing a CDN rule. Preserve protections for private routes while allowing the intended public resources.
After fixing a persistent fetch or parse failure, resubmit the corrected sitemap and review its later status. Success means the file was fetched and read. Investigate individual unindexed pages through URL Inspection instead of repeatedly changing an otherwise valid sitemap.
Ready for a pre-launch audit?
Run the public analyzer and get a prioritised report for the URL you are about to share.
Run the SEO audit