Couldn't fetch sitemap: test the request before editing the XML
A fetch failure is a server or network problem, not a parsing problem. Check DNS, TLS, status codes, redirects and bot protection with the exact URL Google uses.
A failed fetch is not a bad XML file
When Search Console says it could not fetch or read the sitemap, Google never reached the document. Editing the XML will not help until the request path works.
Start with the exact URL from the sitemap row. Reproduce the request without cookies, without a browser session, and with redirects followed. The response you get is the evidence to work from.
curl -sSIL https://example.com/sitemap.xml
curl -sS -o body.txt -w "%{http_code} %{content_type} %{size_download}\n" https://example.com/sitemap.xml
head -c 200 body.txtWork through the layers in order
Each layer produces a different fix. A 404 is a route problem; a 403 or challenge page is an access rule; a 5xx or timeout is origin reliability; a 200 with HTML is a rewrite or fallback problem.
| Observation | Likely cause | Fix |
|---|---|---|
| DNS or TLS error | Wrong host, expired certificate, missing DNS record | Correct the host and certificate |
| 404 or 410 | Route missing or file not deployed | Deploy the file at the submitted URL |
| 301/302 to another host | Protocol or host normalisation | Submit the final URL directly |
| 403 or challenge page | Firewall, CDN rule, bot protection | Allow verified crawlers to fetch the public XML |
| 5xx or timeout | Origin overloaded or too slow | Fix the endpoint and check response time |
| 200 with HTML | SPA fallback or login redirect | Serve XML, not the app shell |
Check redirects and the submitted URL
Google reports the URL you submitted, not the URL you meant to submit. A missing slash, an http URL, or a www variant can add a redirect hop that fails at the edge.
Follow every hop manually and submit the final address. If the site redirects http to https or www to non-www, use the destination in the sitemap and in the Search Console submission.
- Submit the exact final URL, not an alias.
- Avoid chains of more than one redirect.
- Confirm the sitemap is reachable without signing in.
- Check that the response is XML, not gzip-encoded text the client cannot read.
When the fix is bot protection
A challenge page is often invisible to a normal browser session because the browser solves it. Fetch with a plain client and look for HTML, a CAPTCHA script, or a 403 instead of XML.
Allow verified search crawlers on the public sitemap path and keep the protection for private routes. After the rule changes, re-fetch the URL and resubmit it.
Frequently asked questions
The sitemap opens in my browser. Why does Google fail? Your browser may be signed in, cached, or able to solve a challenge. Test with a plain HTTP client and no cookies.
Should I resubmit every day? No. Fix the response, fetch it yourself, then resubmit once and check the last-read time.
Could the sitemap be too large? A fetch failure is not the usual symptom of size; an oversized file usually fails validation after a successful download.
Confirm Google can reach the page
Run the URL through a free audit to separate an access problem from a content problem.
Run a free audit