My Sitemap Shows an Error in Search Console: What Can I Do?

Design Site for SEO
How to Redesign a Website for SEO (Updated for 2022)
May 25, 2022
Places to Use Keywords
15 Places to Put Keywords on Your Site Without Over-Optimizing
June 9, 2022
Show all
Sitemap Error in Search Console

Sitemap Error in Search Console

You can do a million and one different things to optimize your site’s visibility in the search results pages. Every last one of them requires one thing to happen first, and that one thing is indexation. It doesn’t matter how good your content is, how well-used your keywords are, or how nicely formatted your post is; if Google can’t find it, it might as well not exist.

There are many ways you can try to get Google to index your site, but one of the fastest, easiest, and most consistent is uploading a sitemap.

Generating a sitemap is easy. Many blogging platforms even create them automatically. Your site might even have one by default; you can check by checking your domain with /sitemap.xml at the end. If you have one, you’ll see something that looks like this. There are two quirks of ours that you probably won’t see, though:

  • A plugin generates it, so yours may look different if you don’t use a plugin like Yoast.
  • It’s a sitemap index, meaning it’s just showing other sitemaps. An actual sitemap looks more like this.

Either way, the result is the same; either you have a file there or you don’t. It’s easy enough to check.

Couldnt Fetch Sitemap

Uploading a sitemap to Google is also easy. All you need is your site verified in the Google Search Console and then to visit the “upload sitemap” link and give Google a link to the file.

End of the story, Google has access to an index of all your pages, and you’re good to go.

Right?

Couldn’t Fetch Sitemap

Sometimes, when you give google the link to your sitemap, Google will throw an error. They can’t fetch it, which means they can’t use it to index your site.

Now, before you panic, this doesn’t mean Google can’t index your site. They can (probably) still see your site and index your pages. They don’t have a nice and easy list of all of the pages and posts on your site for them to index. They might miss a page, mainly if it isn’t linked to from elsewhere.

Couldnt Fetch Sitemap

If your site has indexation issues, that’s another story and worth writing a separate post on the subject. We might cover that another time. For now, let’s talk about the sitemap.

If Google can’t fetch your sitemap, the first thing you want to do is make sure the sitemap is there. The URL may have a typo, or you left out a letter, or otherwise failed to copy and paste the link correctly. It’s also possible that something got mixed up, and you have a local copy of your sitemap but not one visible online.

If you can verify that the sitemap exists, you’re in a bit of a pickle. The problem is that Google won’t find the sitemap, and there’s not much you can do about it. You can try a few potential solutions, though, so let’s go through them.

Option 1: Troubleshoot Legitimate Problems

The first option you should try is checking to see if legitimate problems are preventing Google from indexing your sitemap. Verifying that you have a sitemap and that it’s publicly visible is just one part of the puzzle.

1. Check robots blocking.

One potential issue is that a directive, either in your site robots.txt file or your .htaccess file, is blocking Google from seeing your sitemap. Both of these methods are generally used to prevent indexation of system pages (like an admin login page, a WordPress attachment page, or a file directory) so they won’t show up in the search results and can’t damage your site’s overall quality levels by being thin, useless pages.

Unfortunately, sometimes useful system pages, like sitemaps, get added to the blocklists. Usually, Google will have a specific “this sitemap is blocked by robots.txt” error if this is the case, but in rare instances in which Google gets confused, they can mix up the errors.

You can read more about robots.txt blocking here.

Another possible source of blocking, if your web host uses Apache, is the .htaccess file. This file allows you to deliver commands to visiting users, including bots and can do everything from forcing www or non-www versions of URLs, adding redirects, and restricting access from bots. You can read more about how it works here. Check that file and look for anything indicating that your sitemap is being blocked or redirected.

2. Verify your sitemap.

This XML Sitemap Validator Tool is a third-party tool that checks your XML sitemap to make sure it’s well-formed and not broken somehow.

Troubleshoot Legitimate Problems

Again, this is a case of “Google will tell you a specific error about this” if it’s the case, but if the sitemap is broken oddly, Google might not know how to parse it and say it’s inaccessible. By validating your sitemap with this tool, you can see if any errors need fixing.

3. Submit your sitemap to Bing.

This one might seem odd, but it’s a clever troubleshooting tip. Bing is one of Google’s biggest competitors. That’s not saying much – they still have a pretty low percentage of the market share – but they have many of the same kinds of tools that Google offers. Including, in this case, the search console equivalent, Bing Webmaster Tools.

If you’ve never used Bing before, you’ll need to set up your account. You can choose to have them pull information directly from Google Analytics, or you can have them index data themselves. Once you’re up and running, you can find the Submit Sitemap button under the Sitemaps section on the left-hand side of the home screen.

Submit Sitemap on Bing

There are two reasons to do this. This first is to check if Bing also has trouble indexing your sitemap. If they do, it indicates your problem has to do with your site or your web host. If they don’t, it’s more likely to be on Google’s end.

The second reason is to get Bing to index and rank your site more effectively. Bing might be a small percentage of the search market share, but it’s better than zero, so it’s beneficial to check in with them from time to time.

4. Remove and resubmit.

Sometimes, bugs and errors creep into massively complex mechanisms like Google. You may be stuck and need to remove your existing sitemap and resubmit it. In the Search Console, you need to click the Remove Sitemap button, wait a few minutes, and then submit your sitemap URL again. If you’re lucky, it will work the second time (or third, or fifth) around, and Google will successfully crawl and index the pages in your sitemap.

If it doesn’t work after four or five tries, don’t keep hammering at it. Either come back later and try again or proceed to other possible solutions.

Option 2: Waiting

Your second option for solving this issue is, unfortunately, just waiting. Sometimes, Google uses the “couldn’t fetch sitemap” error to indicate that they can’t do it right now. Maybe they have a lot of work queued up for the Google bots to handle, and yours will take a few hours or a few days to get to.

Waiting

Maybe something broke, but it’s more like a micro-downtime from your web host or a strange, temporary configuration issue.

Oftentimes, these issues will sort themselves out, and all you need to do is wait. Google will periodically try again and may eventually be able to index your sitemap (and, consequently, the rest of your site).

Waiting isn’t always ideal. If you’re trying to get certain pages indexed faster, you can use techniques like submitting them to the URL inspector or performing enough outreach to earn high-value links to those pages. But luckily, if waiting is all it takes, you don’t need to work yourself up over the issue.

If you’ve tried waiting and the issue persists even after a week or two, you probably have a more persistent problem. It may be on Google’s end, and it may not be something you can solve, but you can potentially “trick” Google into getting it to work. That’s what the other options on this list are all about.

Option 3: Removing Insecure Site Versions

This scenario is most likely an issue with sites that have been around for quite a while.

If you’ve existed for years and added SSL some time ago, your URLs went from HTTP to HTTPS.

You probably had to do a lot of redirecting, many link changes within your internal links, and a lot of waiting while Google shuffled around your site in their rankings because technically, all those URLs are new, and they need to figure out what’s going on.

Insecure Site Versions

It’s also possible that when you linked your website property to the Google search console, you linked the HTTP version (because that’s what you had at the time), and since then, you have added the HTTPS version. You probably (hopefully) only use the HTTPS version by now since HTTPS is a search ranking, security, and trust factor.

Unfortunately, the presence of the HTTP version might be causing problems. Some people have reported that removing the HTTP property and re-adding it as HTTPS is enough to fix these continuity issues.

Option 4: Adding an Extra Slash

This one is bizarre, but it works for quite a few people. All you do is add another / to your URL.

Specifically, say your website is https://www.yourdomainname.com. This domain makes your sitemap URL:

https://www.yourdomainname.com/sitemap.xml

What you do is add another / in front of the sitemap. So, it would look like this:

https://www.yourdomainname.com//sitemap.xml

Strangely, Google doesn’t have an issue with this. It seems like, somewhere in their vast mechanism, they have a simple check that looks for URL problems like that and removes the extra slash before proceeding. They probably assume it’s just a typo or something.

Adding an Extra Slash

But, according to a few sources, this extra slash – and triggering whatever URL rewrite Google has in their software – is enough to get it to parse a sitemap.

This hack isn’t super consistent. Plenty of people in the comments of posts discussing this problem have tried this method and found it doesn’t work for them. But, if it works for you, who’s to argue? You might as well give it a try.

Other Errors and Options

This scenario is pretty much all we have for fixing the “couldn’t fetch sitemap” error in the Google search console. There are some other errors, but they generally all have much more straightforward solutions.

Errors and Options

For example:

  • URL Not Accessible – this is what we mentioned above with the robots.txt and .htaccess blocking.
  • URLs Not Followed – this isn’t an issue with the sitemap itself, but rather than some of the URLs on the sitemap are disallowed. WordPress’s default sitemaps do this a lot, but an app like Yoast fixes it.
  • URL Not Allowed – this happens if a URL on your sitemap is either higher in the hierarchy than your sitemap or isn’t on the same domain. Easy to fix.
  • Compression Error. If your sitemap is a zip file, it broke in compression; recompress it and try again.
  • Empty Sitemap – you have a sitemap, but it’s empty. Pretty obvious when you check and easy to fix.
  • File Size Error. Your sitemap file is somehow bigger than 50MB. That’s pretty insane for an XML file, so something has gone wrong.
  • Invalid X. Attributes, Tags, Dates, URLs, and so on. The XML validator should catch these; they mean something in the XML is broken.
  • Missing X. For the same parameters above, if the XML expects something but doesn’t have the data there, all you need to do is add it (or remove the field if it’s not necessary.)

And, of course, there are other errors for very niche situations, all specified by Google here. Of all of them, the “couldn’t fetch sitemap” error is the one that isn’t clear and easy to fix, which is why this whole post focuses on it. Everything else should be easy.

If you’re struggling with a sitemap error and nothing seems to work, let us know; we’ll see if we can help. Also, if you have a solution for the fetching error we didn’t mention, leave it in the comments.

David Curtis
David Curtis
David Curtis is the founder and CEO of Blue Pig Media. With twenty years of successful execution in sales, marketing and operations, for both clients and vendors, he has a bottom line ROI driven mentality rooted in metrics driven performance across highly competitive global corporate initiatives.

Leave a Reply

Your email address will not be published.