Hello,
Thank you for contacting Rank Math and sorry for any inconvenience caused.
Please add this filter in the theme’s functions.php file:
add_filter( 'rank_math/sitemap/enable_caching', '__return_false');
Here is a guide you can follow to add the filter:
https://rankmath.com/kb/wordpress-hooks-actions-filters/#functions-php-file
Once done, clear your website cache and check the sitemap.
Also, please note that the sitemaps, by default, are set to noindex as you do not want them to get indexed and appear in the search results.
The sitemap should only be submitted in the sitemaps sections and not in the URL Inspection Tool, the URL Inspection Tool will show the error as sitemaps by default are set to noindex.
https://rankmath.com/kb/submit-sitemap-to-google/
Hope that helps.
Thank you.
Hi
i followed the steps , when i checked in xml validator the error still shown to me
Hello,
The sitemap is returning a 404 status and the sitemap’s script is not present in the source as well.
Assuming you are using the latest version of all the plugins and the themes (please update if not yet), it would seem like a conflict with one of the plugins or the theme you are using.
To determine that, please follow this troubleshooting guide:
https://rankmath.com/kb/check-plugin-conflicts/
Here is a video you can follow as well: https://www.youtube.com/watch?v=FcIWRhcUP2c
Only the site admin would know and your users won’t be affected by this troubleshooting.
If the issue persists, please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.
Please do take a complete backup of your website before sharing the information with us.

It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:
https://wordpress.org/plugins/temporary-login-without-password/
You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):
https://wordpress.org/plugins/wp-security-audit-log/
Please do take a complete backup of your website before sharing the information with us.
We really look 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.