Hello, we apologize for the issue you are facing with your sitemap. The error message "Your sitemap appears to be an HTML page" typically indicates that the URL you submitted to Google Search Console is not pointing to the correct XML sitemap but rather to an HTML page.
Here are some steps you can take to resolve this issue:
-
Check the Sitemap URL: Ensure that you are submitting the correct XML sitemap URL to Google Search Console. The correct format should be something like `https://rankmath.com/kb/fix-sitemap-issues/#unsupported.
-
Flush Permalinks: Sometimes, flushing permalinks can help resolve issues with sitemap accessibility. You can do this by going to Settings → Permalinks in your WordPress dashboard and simply clicking Save Changes without making any changes.
-
Check for Caching Issues: If you have caching plugins installed, they might be serving an outdated version of your sitemap. Make sure to clear your cache after making changes.
-
Exclude Sitemap from Caching: If you are using a caching plugin, ensure that your sitemap is excluded from being cached. You can find more information on how to do this in our guide on excluding sitemaps from caching.
-
Check Robots.txt: Ensure that your robots.txt
file is not blocking access to your sitemap. You can check this in Rank Math SEO → General Settings → robots.txt.
-
Inspect the Sitemap File: Use a tool like httpstatus.io to check the status code of your sitemap. It should return a status code of 200.
If you have tried all these steps and the issue persists, please reply to this ticket, and a human agent from the Rank Math Support team will assist you further. Thank you for raising this concern!
Sources:
Rank Math Sitemap Issues and Their Fixes » Rank Math
Hello,
Thank you for contacting us and sorry for any inconvenience that might have been caused due to that.
Can you please share your sitemap URL with us so that we can check the issue further for you?
Meanwhile, please try to follow the steps below and see if that works for you:
1. Flush the Sitemap cache by following this video screencast:
https://i.rankmath.com/pipRDp
2. 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/
Once done, clear your website cache, remove all the submitted sitemap, and resubmit only the /sitemap_index.xml
in the Search Console.
Let us know how it goes. Looking forward to helping you.
Same problem here. XML file always had been excluded. Flush cache, it works for onee day, nextay there is the same problem.
Hello @francisco-5357,
It mostly happens when your sitemap is heavily cached. In this case, you can apply the following filter to your site to disable the transients cache for the sitemap and see if that works for you.
add_filter( 'rank_math/sitemap/enable_caching', '__return_false');
Here’s how you can add filter/hook to your WordPress site:
https://rankmath.com/kb/wordpress-hooks-actions-filters/
Let us know how it goes. Looking forward to helping you.
Thank you.
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.