-
I don’t know if there is a problem with the rankmath plugin but have tried every method to fix the sitemap error issue but it refusing to get solved. Please help me debug and find out what is causing this sitemap issue on my site or the plugin. Thanks
-
Hello,
We apologize for the issue you are facing with the Rank Math sitemap. It can be frustrating when things don’t work as expected. Here are some common sitemap issues and their potential fixes that you can try:
-
Blank or White Page: Check if your sitemap shows a blank page or a white page. If the source code is empty, there may be a conflict with another plugin or theme. You can use the Health Check plugin to identify the conflicting plugin.

-
404 Error: If your sitemap is throwing a 404 error, ensure that your server’s rewrite rules are correctly set up. For Apache, you can add the following to your
.htaccessfile:# START of Rank Math Sitemap Rewrite Rules RewriteEngine On RewriteBase / RewriteRule ^sitemap_index.xml$ /index.php?sitemap=1 [L] RewriteRule ^([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 [L] RewriteRule ^([a-z]+)?-?sitemap.xsl$ /index.php?xsl=$1 [L] # END of Rank Math Sitemap Rewrite Rules -
Sitemap Blocked by robots.txt: Check your
robots.txtfile for any rules that might be blocking the sitemap. You can manage this in Rank Math SEO → General Settings → robots.txt. -
Custom Canonicals: If you have added custom canonicals to your posts, they may not appear in the sitemap. Consider removing custom canonicals to allow Rank Math to generate them automatically.
-
Caching Issues: Ensure that your sitemap is not being cached by any caching plugins. Exclude the sitemap files from being cached to ensure they reflect the latest updates on your site. You can find more about this here.
If you have tried all these methods and are still facing issues, please reply to this ticket, and a human agent from the Rank Math Support team will take over and assist you further.
Thank you for raising this concern! We hope to resolve it for you soon!
Sources:
Rank Math Sitemap Issues and Their Fixes » Rank Math
Why the Sitemap_Index.xml is Throwing a 404 Error » Rank MathHello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
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/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. 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/
If the issue persists, please share your website URL here so we can check it closely.
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.
-
The ticket ‘Rankmath sitemap errors’ is closed to new replies.