Sitemap could not be read: the four causes, and the command that names yours
Search Console's "Sitemap could not be read" is one message for four different failures. That is why the usual advice — resubmit it, wait, resubmit again — works for maybe a quarter of the people who try it. The message means Google fetched the URL you submitted and could not parse it. Nothing about your pages. The four causes below account for every case we have seen across six small static…
The "Sitemap could not be read" message in Google Search Console can indicate four different issues. The usual advice to resubmit the sitemap and wait may only work for a quarter of cases. To identify the specific problem, use the following steps:
1. Check if the file is in the wrong format. Use the command "curl -sS -o sitemap.xml -w '%{http_code} %{content_type}\n' https://example.com/sitemap-index.xml" to request the sitemap and check the content type. If it is text/html, that is the issue.
2. If the index points to a missing child, use "curl -s https://example.com/sitemap-index.xml | grep -o ' loc [^ ]*' | sed 's/ loc //' Fetch each URL that prints" to check for 404 errors.
3. Ensure the sitemap only lists URLs on its host. Use "curl -s https://example.com/sitemap-0.xml | grep -o ' loc [^ ]*' | head -3" to verify the loc lines match your domain. If they do not, that is the cause.
4. Confirm the file size is within limits (50,000 URLs and 50 MB) and uses the correct encoding. If it is too large or compressed improperly, that is the problem.
After identifying the issue, fix the sitemap, deploy the changes, and then resubmit. Remember, a sitemap only serves as a hint, so ensure internal links are properly connecting your pages.
Rewritten by urgent.news; may contain errors — check the original.