Hello,
We apologize for the issue you are facing with your sitemap. The error message indicating that your sitemap appears to be an HTML page usually means that the correct XML sitemap is not being served. Here are some steps you can take to troubleshoot and resolve this issue:
-
Check the Sitemap URL: Ensure that you are submitting the correct XML sitemap URL to Google. It should be `https://rankmath.com/kb/fix-sitemap-issues/#google-cant-find-sitemap.
-
Plugin Conflicts: There might be a conflict with another plugin. You can use the Health Check plugin to identify any conflicts that may be causing this issue.
-
Flush Permalinks: Sometimes, flushing permalinks can help. Go to your WordPress dashboard, navigate to Settings → Permalinks, and simply click Save Changes without making any changes. This can refresh the permalink structure and may resolve the issue.
-
Check for Static Files: Ensure there are no static files named sitemap_index.xml on your server that could be conflicting with the dynamic sitemap generated by Rank Math. You can check this via FTP.
-
Caching Issues: If you are using a caching plugin, make sure to clear your cache and exclude the sitemap from being cached. You can find more information on how to do this in our guide on excluding sitemaps from caching.
If these steps do not resolve the issue, please reply to this ticket, and a human agent from the Rank Math Support team will assist you further. Thank you for bringing this concern to our attention!
Sources:
Rank Math Sitemap Issues and Their Fixes » Rank Math
Hello,
Thank you for your query and we are so sorry about the trouble this must have caused.
Please follow the steps below:
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/
3. Apply the following filter code to your site.
add_filter( 'rank_math/sitemap/enable_caching', '__return_false');
Here’s how you can add filter to your WordPress site:https://rankmath.com/kb/wordpress-hooks-actions-filters/
Let us know how that goes. Looking forward to helping 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.