Your Sitemap appears to be an HTML page. Please use a supported sitemap format instead. Google sitemap issue comes up with this error even though webmasters submitting sitemap in xml format. We have googled a lot of time to find solutions but finally solution was discovered by testing different parts in Google webmaster.
While submitting your sitemap in Google webmaster, if you are getting this error “Your Sitemap appears to be an HTML page. It means your site has been compromised. And a hacker injected some weird data into your website. But the question is, where he injected. By considering subjected issue I would say, he injected hacked data in to your website index file. So go ahead and see the solution below. You can also watch video tutorial in order to get better idea for Google sitemap format error.
Your Sitemap appears to be an HTML page – Solution
Step # 1
First of all you need to check your website data structure. In order to do that, open your Google webmaster tools and follow the instructions below.
- Click on the website for which you are having sitemap problem.
- From the left side menu, click on last option “Other Resources”
- Now click on “Structured Data Testing Tool”
- Type your website under ‘Fetch URL’ and click on ‘Run Test’ button
Confused? 🙂 No worries, simply click this button and put your website address [su_button url=”https://search.google.com/structured-data/testing-tool/u/0/” target=”blank” style=”3d” background=”#ef662d” size=”5″ center=”yes” radius=”5″ icon=”icon: flag-checkered” icon_color=”#ffffff” text_shadow=”-1px 0px 0px #000000″ rel=”follow” title=”Google Webmaster”]Run Test[/su_button]
Wait some time and you will see data on left hand side (see video). If your website is still hacked then you might seen some weird Chinese language injected into your website. Which of-course you cannot understand if you don’t know Chinese. This happens in my case, for your case it depend which language hackers write in your index file. Anyhow don’t worry, solution is still simple and same.
Step # 2
- Login to your cPanel account or if you are using Filezilla then open your ‘public_html’ folder
- If using cPanel then go to ‘File Manager’
- Go to ‘public_html’ folder. (if your website is installed in sub directory then open that directory folder)
Be advised, you should take a backup before making any changes to any file.
- Locate ‘index.php’ file and rename the file. For example ‘index-test.php’
- Now create new file and name the file as ‘index.php’
- After you create new file, right click on that and click on ‘Edit’
- In file editor copy and paste following default code and save this file
* Front to the WordPress application. This file doesn’t do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
* @package WordPress
* Tells WordPress to load the WordPress theme and output it.
* @var bool
/** Loads the WordPress Environment and Template */
require( dirname( __FILE__ ) . ‘/wp-blog-header.php’ );
Step # 3
Go back to your Google webmaster tools and resubmit the sitemap.
You should refresh the page couple of times in order to get results. Let me know in your comments, if still have issues.