Hello,
We apologize for the issue you are facing with the 404 error on your Rank Math sitemap. It sounds like you’ve already taken several steps to troubleshoot this problem, which is great. Here are a few additional suggestions that might help provide a more permanent solution:
-
Flush Permalinks: You mentioned that saving changes in the Permalink settings temporarily resolves the issue. Make sure to do this regularly, as it can help refresh the permalink structure.

-
Check for Plugin Conflicts: Since you are using the Seraphinite Accelerator plugin, ensure that there are no conflicts with Rank Math. You can use the Health Check plugin to identify any potential conflicts with other plugins.
-
Disable Caching for Sitemap: You have already added the filter to disable caching in your rank-math.php file, which is a good step. Ensure that this filter is correctly placed and that there are no other caching mechanisms interfering with your sitemap.
add_filter( 'rank_math/sitemap/enable_caching', '__return_false');
-
Check Robots.txt: Ensure that your robots.txt file is not blocking access to your sitemap. You can check this by navigating to Rank Math SEO → General Settings → robots.txt.
-
Static Files: Make sure there are no static files named sitemap_index.xml on your server that could be causing conflicts. If such a file exists, it should be removed.
-
Server Configuration: Since you are using Hostinger, consider checking with their support to ensure that there are no server-level caching or configuration issues affecting your sitemap.
If these steps do not resolve the issue, 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, and we hope to help you get this resolved soon!
Hello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
Hello,
In this case, we might need to take a closer look at the settings. 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/
We really look forward to helping you.
Hello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
Hello,
Given that the filter is enabled and you no longer have XML files saved in the uploads/rank-math the sitemap will not be cached anymore on your website.
The plugin will always generate it fresh when the URL is being accessed, which is happening right now.
Don’t hesitate to get in touch if you have any other questions.
I am still getting the 404 error why is that?
Hello,
Your sitemap is working fine now. If it starts throwing a 404 error again reach out to us without doing the temporal fix.
You might also want to Seraphinite Accelerator to make sure the sitemap (wildcard), along with its sub-sitemap are properly excluded from its cache.
Don’t hesitate to let us know if you need help with anything else.
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.