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

#38783
  • Resolved Homer
    Rank Math free

    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 9 replies - 1 through 9 (of 9 total)
  • Michael Davis
    Rank Math pro

    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 https://www.xml-sitemaps.com/validate-xml-sitemap.html 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.

    ​​​​​​​

    Homer
    Rank Math free

    Hi,

    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?

    Todd
    Rank Math free

    Hello,

    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.

    Homer
    Rank Math free

    Okay. I will try again and let you know.

    Michael Davis
    Rank Math pro

    Hi Homer,

    Thanks for the reply.

    Please keep us posted πŸ™‚

    Homer
    Rank Math free

    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?

    Todd
    Rank Math free

    Hello,

    I am so glad that it is working fine now.

    It had to do with caching like I previously mentioned.

    To fix this permanently, you must ask your cache plugin provider how to exclude the sitemaps from getting cached – provided the instructions I gave you previously do not work.

    Homer
    Rank Math free

    Defo, yes. It had to do with caching indeed.

    Thanks for your support and keep up amazing job with this plugin.

    Todd
    Rank Math free

    Hi Homer,

    We are so glad to be of help. We are always here if you need us in the future.

    Hey, if it isn’t too much to ask for – would you mind leaving us a review here?

    https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post

    It only takes a couple of minutes but helps us tremendously.

    It would mean so much to us.

    Thank you.

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

The ticket ‘Google search console error – Xml couldn’t fetch: Incorrect http header content’ is closed to new replies.