Running into the “Sitemap could not be read” error on Google Search Console after adding your sitemap URL for the very first time is not fun, especially if you are just launching a new site and you are eager to let the world know about it.
The error can be thrown not only for a newly submitted sitemap but also for an already submitted and successfully read sitemap.
You can see an example of this error in the screenshot below. This error is shown under the Status column generally as “Couldn’t Fetch.”
And when you click on the sitemap with “Couldn’t Fetch” status. You will see a more detailed error message that says: “Sitemap could not be read,” followed by “General HTTP Error,” as shown in this screenshot:
There is another GSC sitemap error type that says, “Sitemap can be read, but has errors,” followed by one of these sub-errors:
- Unsupported file format
- Sitemap is HTML
You can see these errors in the screenshots below:
Although some might think that this “Sitemap could not be read” problem can prevent Google from indexing your pages, Google can still crawl your site and follow its links to other pages to index and display your site in search results, as Google doesn’t solely rely on sitemaps to crawl and index web pages. So, the chances that this issue alone (if it’s not part of a bigger problem) can harm your site’s visibility are very low unless in very rare cases.
In any case, the issue shouldn’t be ignored and has to be investigated as it might be a sign of a bigger problem that you would rather fix sooner than later.
Also, this issue is not very common; I personally don’t remember having faced it more than maybe a couple of times throughout my 15-year SEO career.
Nevertheless, in this guide, I will explore various reasons behind this error and provide detailed steps to troubleshoot and fix it.
Potential Causes of the “Sitemap Could Not Be Read” Error
This error message often indicates one main thing: issues in accessing the sitemap file by Google.
Now to fix this, we need to first understand the potential causes behind it. Let’s first go through some of the potential causes:
1. Restrictions in .htaccess or robots.txt Files
Improper settings in .htaccess or robots.txt files can block Google Bot from accessing the sitemap. For instance, unnecessary disallow rules like Disallow: /sample-* might restrict access to essential parts of the site, leading to errors when Google tries to fetch the sitemap.
2. Glitches in Google Search Console
There are instances where Google Search Console may display errors like “Couldn’t fetch” due to temporary glitches. It’s been noted that sometimes, even after the sitemap is correctly set up, Google might still show an error. In these cases, patience is key, as it might resolve on its own.
3. Site Migration (DNS propagation issues)
If you’ve recently moved your site, such as migrating from WordPress to another CMS, or you have changed your website domain name or server, you need to make sure that all the migration steps are properly completed and the changes have fully gone through the propagation phase before resubmitting your sitemap to resolve this access error.
4. Subdomain Sitemaps
When you have a Domain Property in GSC, you will also be able to submit sitemaps for your subdomains. For example, if your blog is on a different subdomain (e.g., blog.domain.com)
you can submit a sitemap for this subdomain directly via the main domain property on GSC.
Sometimes, Google might face errors when trying to access sitemaps for subdomains from the domain property. I was not able to reproduce this problem myself at the time of writing this blog post but it’s advised to reference your subdomain sitemaps from the main domain’s robots.txt file.
Potential Causes of the “Sitemap Could Be Read, But Has Errors”
Now let’s go through some other reasons that could generate the other error: “Sitemap could be read, but has errors.”
1. Line Feed Format Issues
One of the less obvious but impactful causes is the line feed format used in the sitemap file. It’s been said that sitemaps generated with “Windows (CRLF)” line endings may not be properly processed by Google. The correct format should use “Unix (LF)” line endings. This discrepancy can cause Google to misinterpret the sitemap, leading to errors.
2. Incorrect Content-Type Header
The server should deliver the sitemap with the correct Content-Type header, specifically application/XML. If the sitemap is not served with this header, Google may not recognize it as an XML file, which can result in the “Sitemap could be read, but has errors” issue.
4. Syntax Errors in the Sitemap
Small syntax errors in the sitemap file can lead to Google facing issues while reading your sitemap. These errors might include improper XML structure, missing tags, or incorrectly encoded characters. Using a sitemap validator can help identify and fix these issues.
How to Troubleshoot
Now that you have a better understanding of this GSC sitemap error and its potential causes. Let’s see how we can troubleshoot it.
Here are five steps that can help you troubleshoot the “sitemap could not be read” issue:
1. Check Sitemap Accessibility
First, verify that your sitemap is accessible. Enter your sitemap URL into a browser (e.g., https://example.com/sitemap.xml). If you receive a 404 error or the page doesn’t load, there may be issues with the sitemap’s availability.
2. Inspect Google Bot Access
Use Google Search Console’s “Inspect any URL” feature to check if Google Bot can access your sitemap. Paste your sitemap URL and use the “Test Live URL” feature. A successful page fetch indicates that Google Bot can access the file.
3. Check .htaccess and robots.txt Files
Ensure these files do not block Google Bot. For instance, incorrect rules in your robots.txt file can restrict Google’s access to your sitemap file. Remove unnecessary disallow rules like Disallow: /sitemap-* that could cause issues.
Use this robots.txt testing tool to validate and interpret your robots.txt rules.
4. Cross-check with Bing Webmaster Tools
As a cross-check, submit your sitemap to Bing Webmaster Tools. If Bing can successfully fetch your sitemap, it may indicate that the issue is specific to Google. This can provide reassurance that your setup is correct, but somehow, Google is unable to access it.
If the sitemap can’t be accessed by Bing either as shown in the screenshot below, that means you have an access issue.
5. Check Propagation Issues
If you have recently moved your site to a new server, a new domain name, or changed the CMS platform, ensure that changes related to the DNS propagation are completed, and then resubmit your submission to see if the issue will be resolved.
2. Validate Sitemap File Format and Syntax
Sitemaps must adhere to specific XML formatting rules. Use tools like the XML Sitemap Validator to check for syntax errors. Even minor issues can prevent Google from correctly parsing your sitemap file. However, syntax or file format issues will generate the “Sitemap can be read, but has errors” rather than “Sitemap cloud not be read.”
But checking for these errors can still be helpful in giving you reassurance that there is no syntax or file format issue.
- Line Feed Format: Ensure your sitemap uses Unix (LF) line endings instead of Windows (CRLF). This can be changed using code editor tool like Visual Studio Code or BBEdit.
- Content-Type Header: Make sure your server sends the correct Content-Type header (application/xml). This tells Google that the file is an XML document.
This is more often the case when the sitemap is manually generated or changed. If you find any syntax errors, try to resolve them and resubmit your sitemap to see if it will resolve the issue. If you use any type of caching system, try to empty it before resubmitting the sitemap file.
Solutions
After going through the above standard troubleshooting steps, if the problem still persists, here are some solutions that might help you resolve the “sitemap could not be read” issue:
1. Changing the Sitemap File Name
Try changing the sitemap file name and resubmitting it again. If the sitemap is auto-generated by your CMS or if you use a plugin like Yoast for WordPress, this might be challenging as you might not find an easy way to change the sitemap name. However, you can still copy the autogenerated sitemap, upload it with a different name, and then submit it to GSC to see if it resolves the issue as another troubleshooting step.
Did you know that the Rank Math SEO plugin for WordPress, unlike Yoast, lets you change the sitemap URL and name? So, if you use Rank Math, you can follow this guide to change your sitemap name.
2. Manually Submitting URLs
While resolving the sitemap issue, manually submitting individual URLs through Google Search Console can be a temporary workaround. This ensures that critical pages are crawled and indexed. To do this:
- Navigate to the “URL Inspection” tool in Google Search Console.
- Enter the URL of the page you want to submit.
- Click “Request Indexing.”
3. Wait and Try Again in a Few Days
Sometimes, just waiting will fix the issue. This is the case when the issue is not from your side but rather a temporary issue or glitch in the Google Search Console. You can check back in a few days or after a week to see if the issue is resolved by itself.
4. Add Sitemap Entry to Your Robots.txt File
Try adding the sitemap URL to your robots.txt file. This does not guarantee that it will fix the “sitemap could not be read” error, but it can be a step toward fixing the error. Also, ensure that you are not, by mistake, disallowing access to the sitemap URL in your robots.txt file.
5. Contact Support or Seek Community Help
If all else fails, seek assistance from support forums, community experts, or the Google Webmaster Support Forum. In some cases, engaging with community experts or Google’s support team can provide insights or solutions that might not been covered in this post.
Fixing the “Sitemap could not be read” error involves a mix of technical checks and patience. Most issues can be resolved by ensuring your sitemap is accessible, properly formatted, and free from syntax errors. Sometimes, the error is caused by GSC hiccups or glitches for which your only friend will be to wait and be patient.
Have you faced this issue? Share your experiences and solutions in the comments below.