Hello,
We apologize for the issue you are facing with the sitemap when Rank Math is disabled. It sounds like there may be a conflict or a setting that needs to be adjusted.
To troubleshoot this, you can try the following steps:
-
Flush Permalinks: Go to WordPress Dashboard → Settings → Permalinks and click the Save Changes button without making any changes. This can help refresh your permalink structure.

-
Exclude Sitemap from Caching: Ensure that your sitemap is excluded from caching if you are using a caching plugin. You can refer to this dedicated knowledgebase article for guidance.
-
Disable Transient Caching: If the above solutions do not work, you can add a filter to your theme’s rank-math.php
file to disable transient caching of your sitemap:
/**
* 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 continue to experience issues, please reply to this ticket with your site URL so that a human agent from our support team can assist you further. Thank you for raising this concern!
Sources:
Rank Math XML Sitemaps on NGINX Servers » Rank Math
у меня 8 сайтов и везде стоит все одинаково. а не работает только тут https://jorneyunfolded.pro/sitemap_index.xml
Hello,
Thank you for contacting Rank Math support.
The most common reason for this error is a whitespace in your theme code, such as a blank line or space in your wp-config.php file or your theme’s functions.php file. This can happen when you edit these files manually or use a plugin or theme that modifies them.
To fix this error, you need to find and remove the whitespace from your theme code. You can refer to this guide: https://rankmath.com/kb/fix-sitemap-issues/#xml-text-declaration
If the issue persists, you can also use this script to automatically fix this error: https://wejn.org/stuff/wejnswpwhitespacefix.php.html
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.