Hello,
Thanks for contacting Rank Math support. We apologise for any inconvenience this might have caused you.
Please follow the steps below to see if it 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/
#3. If the above steps doesn’t seem to work, kindly apply the following filter code to your site.
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/
Once done, please clear your website cache, remove all the submitted sitemaps, and resubmit only the main sitemap in the Search Console and see if that works for you.
Let us know how it goes. We look forward to hearing from you.
Thank you.
Hi, we have tried the first and second resolution and the issue still persists.
The 3rd solutions seems too complicated and the developer is asking whether we can just upload the line of code to functions.php
If yes, do we need any additional code to do so?
Thanks!
Hello,
No need for additional code. Simply copy and paste the single line of code we previously shared at the end of the functions.php file.
You can check the guide to help you properly add the code to your website: 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.