Google search console error – Xml couldn’t fetch: Incorrect http header content

  • Hello there,

    regarding previous chat in Facebook group:
    ” Hi. I was trying to figure out the Google search console error – Xml couldn’t fetch. I have read couple comments here when searching group and even found error when use XML Sitemap Validator which says – Incorrect http header content-type: “text/html; charset=iso-8859-1” (expected: “application/xml”). What is that mean and what is wrong with as I have no idea? I have been using Google XML Sitemaps plugin previously with no issues at all. I can swap back for previous plugin but was hoping it is easy fix and you might help here. ”

    You have suggested to exclude sitemap in Comet Cache plugin which I did and it is not working.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    I have just tested your sitemap on this page and everything seems to be working as expected.

    Please clear your site cache and resubmit the sitemap and let us know if the same error is reported.

    Looking forward to helping you. Thank you.



    That’s the thing. This validator shows the error: “Incorrect http header content-type…”

    I also had a chat with a host support and clear cache. No change, unfortunately.

    However, I have been suggested to try change the index_sitemap.xml file name to previous one as it was with different xml plugin to just sitemap.xml. Do you know how could I change the sitemap file name in RankMath settings? I’d like to give it a try.

    Another person suggested me to keep the filename as it is – the RankMath generated – and even it shows like “Couldn’t fetch” will be fine i njust couple weeks so I have decided it for this option aswell.

    IMPORTANT QUESTION: If I won’t keep RankMath generated xml file and go for working xml plugin, does it affect seo settings in each post and page I have already change manually (Titles, keywords, schema, social..)? Also setting in RankMath?


    Can you please do the following:

    1. Please delete the sitemaps from the Google Search Console.

    ​2. Clear your website cache and add sitemap_index.xml and *-sitemap.xml to the exclusion list in your Cache plugin.

    ​3. Add sitemap_index.xml file again to your Google Search Console.

    ​That should do the trick.

    ​Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Okay. I will try again and let you know.

    Hi Homer,

    Thanks for the reply.

    Please keep us posted 🙂

    Hello again,

    Hooray! Sorted!

    I have tried couple things but not sure what was the one it has actually done the job.

    1. I have renamed a file advanced-cache.php in wp-content directory aswell as a folder cache there.

    2. Then I renamed advanced-cache.php back

    And it is working now!

    I think it has something to do with wp cache settings in wp-config.php. I assume when I would set the wp cache value in wp-config.php to “false” it would do the job aswell?

Viewing 6 replies - 1 through 6 (of 6 total)

You must be logged in to reply to this ticket.