-
When I am try to validate my sitemap the error shows again and agian incorrect http header content-type I try every possible way to fix but its not fixed.
-
Hello,
We’re sorry to hear that you’re encountering the “Incorrect HTTP header content-type” error while validating your sitemap. This error usually occurs when the server expects an XML sitemap during validation but receives a response of a different content type, such as HTML or a 404 error.
To fix this error, you can follow the steps outlined in our knowledgebase article on how to fix the “Incorrect HTTP Header Content-Type” error in sitemaps. You can find the article here.
The steps include flushing permalinks, flushing sitemap settings in Rank Math, excluding the sitemap from caching, and checking for restrictions from your web host. If you’ve already tried these steps and are still encountering the issue, please let us know, and we’ll be happy to assist you further.
If you have any questions or need further assistance with any of the steps, feel free to ask.
Sources:
How to Fix “Incorrect HTTP Header Content-Type” Error in Sitemaps » Rank Math
Indexed, Not Submitted in Sitemap – Google Search Console » Rank Math
Troubleshooting the “Couldn’t Fetch” Error in Google Search Console » Rank MathHello,
Could you please share your sitemap URL so we can check as well?
Meanwhile, please follow the steps to flush the sitemap cache:
1. Flush the Sitemap cache by following this video screencast:
https://i.rankmath.com/pipRDp2. Exclude the Sitemap files of the Rank Math plugin in your caching plugin. The cache could be via a plugin or from the server. For plugins or Cloudflare, please follow this article:
https://rankmath.com/kb/exclude-sitemaps-from-caching/3. Disable the transient cache for the sitemap by applying this filter. This will make sure that your XML sitemap always reflects the latest changes on your site:
/** * Filter if XML sitemap transient cache is enabled. * * @param boolean $unsigned Enable cache or not, defaults to true */ add_filter( 'rank_math/sitemap/enable_caching', '__return_false');
If you’re not sure how to add this code, you can follow this guide:
https://rankmath.com/kb/wordpress-hooks-actions-filters/Let us know how this goes.
https://edusnews.com/sitemap.xml this is my sitemap url
Hello,
We’ve checked your sitemaps, and it is being generated by Yoast at the moment.
Let us know when we can check your sitemap coming from Rank Math.
Looking forward to helping you.
Thank you.
I removed Yoast Seo And Activate Rankmath please check my sitemap and fix Incorrect http header content-type
sitemap url is https://edusnews.com/sitemap.xml please fix this issue.Hello,
We could replicate the same error when we tested your sitemap using https://www.xml-sitemaps.com/validate-xml-sitemap.html.
Kindly confirm you have followed the steps in this guide
If the issue persists after following the guide you can edit the first post in this ticket and add your WordPress login details to the Sensitive Data Section, so that we can investigate the issue further.
For information purposes the correct URL of the sitemap generated by Rank Math is https://edusnews.com/sitemap_index.xml
Let us know how this goes.
Thanks.
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.
The ticket ‘Sitemap Error’ is closed to new replies.