In this tutorial, I would like to demonstrate a real-time error cause when uploading my website’s sitemap to Google Search Console. As a website owner, you may have experienced this problem a few times and this article is for you. Even beginners can get a lot of information about how to fix the problems of uploading a sitemap on Google Search Console through this article.
Before we move on to the main part of the article, you should first know what a sitemap and Google Search console are and how both of them work to get your job done.
What is a sitemap?
Table of Contents
The sitemap is a tool that plays an important role in helping search engines to identify your website. As a website owner or a business owner, you know how important the sitemap is for your career. A sitemap contains complete information about all the pages of your website. It helps in crawling and indexing operations.
It also contains information about the frequency of changes of your URL compared to other URLs, but this does not affect the ranking of your website.
What is Google Search Console?
Search Console is nothing but a web service provided by Google that helps in optimizing and checking the index status of your website. Moreover, it helps Google to find and also to crawl it. It allows you to view the network traffic on your website.
Reason for the error
Now we come to the problem I was having. In fact, I got the error message “Your sitemap appears to be an HTML page. Please use a supported sitemap format instead.” while submitting my sitemap to Google Search Console.
The reason for this error message is that your sitemap should be in XML format and is not accepted in HTML format. Actually, my website sitemap should be in the following format: https://wpblogx.com/sitemap_index.xml. However, if you upload an HTML file as a sitemap, this error will occur.
In my case, I uploaded the correct sitemap format to Google Search Console. This error occurs in my case because of the caching plugin. I solved this problem by excluding the sitemap pages from caching.
I am using Swift Performance as a caching plugin on my website.
You can also use other caching plugins like W3Total cache, WPRocket etc. You can follow the same step to exclude sitemap URLs from your caching plugin. The steps may vary depending on the plugin.
Solution for the error
Currently, I am using “Yoast” as an SEO plugin for my website. This Yoast SEO automatically created a sitemap and I need to add the sitemap in Google Search Console.
You need to exclude the sitemap URLs from the Swift Performance plugin. Please follow the steps below to exclude the sitemap URLs from caching. You can apply the same process for W3Total Cache, WPRoket and other caching plugins. However, the steps may vary.
The following image shows the error that occurs when uploading the file “/sitemap_index.xml” in Google Search Console.
You can see the detailed description of the error. If you click on the error.
Step 1: Now open your website admin panel and then go to Tools – Swift Performance and click on the Settings tab.
Step 2: Now paste your sitemap link into the field as follows: “/sitemap_index.xml”. Then click on the “Save Changes” button. Now the sitemap URL will be excluded from the caching.
Step 3: Click on “Reset Warmup Table” to confirm the changes made in the table.
Step 4: Click on the “Dashboard” tab and now select the “Clear All Caches” button on the screen.
Step 5: After clearing all the caches, now try to resubmit your website sitemap. Go to the Google search console – click on the sitemap. Upload your sitemap and click on the “Submit” button.
Step 6: Everything looks good now. The sitemap has been updated.
Your site may be that your website is not indexed for some other reason, and this article is not meant to give you a solution to all the problems. So before fixing your problem, you must first investigate all aspects like caching and SEO plugins or any other reasons. I think you will be satisfied with my article.