Google Search Console (GSC) is a free set of tools for webmasters to submit their site to Google. It helps monitoring your site’s performance in Google Search and take corrective actions for improving search visibility. After verifying your WordPress site’s ownership, submitting XML Sitemap is the next important step you need to do in GSC. However, you may face different types of errors when submitting WordPress sitemap in Google Search Console (GSC). In this article, we will explain the possible solutions to fix sitemaps errors.
Checking Sitemap Errors in GSC
Follow the below instructions to check any sitemap errors:
- Login to your Google Search Console account.
- Navigate to “Sitemaps” section.
- Look under the “Status” column of your submitted sitemaps. It should show “Success” or the relevant error message applicable for your case. “Couldn’t fetch” and “error” are some of the most popular sitemap errors you can see in GSC.
- Click on the sitemap showing error to view more details about the error. As you see in the below screenshot, the error is a “General HTTP error” caused due to “HTTP error: 403”.
It is easy to check the status of your sitemap whenever you submit for the first time. However, Google will crawl your sitemap daily and the status will change dynamically according to the real situation. Unfortunately, Google will not send email to site owners when there are Sitemap errors for already submitted sites. Therefore, the only option is to check the status manually and make sure there are not crawling errors.
Why You Should You Monitor and Fix Sitemap Errors?
You may wonder why to monitor the status after Google successful crawled the sitemap URLs. Recently, we have noticed large number of our site’s pages were removed from the Google search without any valid reason. After checking in GSC, we found coverage issue with more than 400 pages were affected with 403 forbidden error. Google also could not fetch the sitemaps due to 403 HTTP error as shown in the above screenshot.
Therefore, it is necessary to check the coverage and sitemap crawl status so that you can get an idea of what is going on your site.
Fix WordPress Sitemap Errors in Google Search Console
Try the followings options to fix sitemap errors in GSC.
1. Remove and Resubmit Sitemap
As you might know, Google Search Console was earlier known as Google Webmaster Tools with a solid interface. However, the latest Google Search Console interface is not stable and can show errors which you can’t fix. For example, you may see “Couldn’t fetch” or “error” as sitemap status while everything is fine on your site. The first option you should try is to remove the sitemap and resubmit again.
- Click on the sitemap that shows error in the status column.
- On the next screen, click on the three dots showing as “More options”.
- Select “Remove Sitemap”.
- Again, confirm the pop-up by clicking on “Remove” to delete your sitemap from GSC.
- You will see a “Sitemap removed” success message on the bottom.
Now go back to “Sitemaps” section and resubmit your sitemap.
If everything goes well, you will see the status as success.
If the error message appears again, you may need to remove and resubmit few times to get the success status.
2. Check Sitemap Access and Format
If resubmitting did not solve the problem, it’s time to start the troubleshooting process on your site. First thing you need to check is to open the sitemap URL in the browser. Make sure you are not getting 403 forbidden error or any other HTTP timeout errors. You can also check the file permission of XML sitemap file on the server so that it is accessible on a browser. If the sitemap file is accessible, then try the below options.
If you are using custom sitemap, make sure to check the format and structure are correct before submitting in GSC.
3. Clear Caching
Caching helps to speed up your WordPress website and reduce the page loading time. However, it can cause few problems when not used properly. First, check the date in which you got the sitemap error in GSC. Try to figure out whether you have done any major changes to your site during that time. Possibly, you might have updated a plugin or changed theme on your site and forget to purge the old cached content. Even you did not do any changes, corrupted cache can block Googlebot and lead to 403 error though you can properly view the pages in the browser.
- If you are using caching plugin on your site, purge the entire caching from plugin’s settings page.
- Check if your server does any caching and flush all cached content. For example, hosting companies like SiteGround offers static, dynamic and Memcached caching. You must flush all these caching to serve fresh content to Googlebot to avoid any caching related errors.
After deleting all cached content, use URL inspection or mobile-friendly tool in GSC to check how the crawled page looks to the Googlebot. If everything looks fine, you can try resubmitting the XML sitemap.
4. Exclude Sitemap from Caching
There is another possible problem with caching. Some plugins may cache your XML sitemap file and cause problem. Popular caching plugins like WP Rocket by default ignore XML sitemap and WooCommerce pages from caching. If you are not sure whether your caching plugin ignores sitemap URL, then manually add the failed sitemap URLs. After that flush the cache and check the sitemap submission works fine in GSC.
You can add one the below entries in your caching plugin’s settings page to ignore sitemap files from caching:
Generally, plugins ignore the domain part and adding the above entries should ignore all sitemap files from caching.
5. HTML Vs XML Sitemap
There are two types of sitemaps available – XML sitemaps help search engines and HTML sitemaps help human users. You must submit XML sitemap in GSC, otherwise you will see an error like “Submitted sitemap is a HTML page”.
6. Large Sitemap File
WordPress by default generates a sitemap file. However, using plugins help to generate customized sitemap files and hide unnecessary content like tags and archives. For example, Yoast SEO plugin will generate XML sitemap by simply toggling an option in the settings. You can easily enable or disable post type and taxonomies to show or hide in sitemap. It is also possible to include or exclude individual post/page in the sitemap.
However, the problem comes with the size of the sitemap file. Earlier, Yoast used to offer an option to control the number of URLs on each sitemap file. However, this has been removed and now each individual sitemap can contain maximum of 1000 URLs. Many shared hosting servers will prevent viewing a single sitemap file with 1000 URLs due to limited server resources. This could stop Googlebot from crawling the large sitemap and result in errors like 403 forbidden.
In this case, the only option is to disable sitemap function from Yoast and look for another plugin that helps you to break the sitemap into smaller files. Possibly you can limit the number of URLs to 200 or less in a single sitemap so that Googlebot can easily crawl with errors.
7. Sitemap Index and Individual Sitemaps
Another problem could be due to the sitemap index that contain large number of individual sitemaps. Most of the time it happens that Googlebot could not crawl one or few of the individual sitemaps under the index file. In this case, you can delete the individual sitemap.xml files and submit them separately. Though this does not make any difference, it worked fine as we tested multiple times. The sitemap failing with error status as part of an index file works fine when submitted as an individual sitemap file.
You can try one of the above solutions to fix sitemap errors in Google Search Console. If you consistently see forbidden error, check with your host whether they limit Googlebot crawling rate. In order to make sure the sitemap errors not affecting your traffic, use URL Inspection tool to confirm your important pages are available on Google. If pages are not available, request reindexing of the pages first till the time you try to resolve your sitemap issues.
Leave a Reply
Your email is safe with us.