Hello,
We apologize for the issue you are facing with the sitemap returning a 404 error. Thank you for raising this concern.
To resolve the 404 error for your sitemap, we recommend the following steps:
-
Flush Permalinks: Sometimes, simply flushing the permalinks can resolve the issue. To do this, go to your WordPress admin area and navigate to Settings → Permalinks, then click the “Save Changes” button without making any changes.

-
Check Sitemap Location: Ensure that your sitemap is located in the root folder of your WordPress installation. The correct URL should look like this:
https://yourdomainname.com/sitemap_index.xml
-
Validate Your Sitemap: Use the Validate XML Sitemap tool to check if your sitemap is correctly configured. If it returns a success message, then your sitemap is set up correctly.

-
Check for Plugin Conflicts: Sometimes, other plugins can interfere with the sitemap functionality. You can use the Health Check plugin to identify any potential conflicts.
-
Server Configuration: Since you mentioned that your PHP limits are high, ensure that your server meets the following requirements:
- PHP max input variables: 1000
- PHP time limit: 120
- PHP memory limit: 512M
- Max input time: 150
You can check these values under Tools → Site Health → Info in your WordPress dashboard.

If you have tried all these steps and are still encountering 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 your patience, and we hope to resolve this issue for you soon!
Hello,
1 – I think I did the permalink cleaning thing 10 times. This only provides a temporary solution, when I wake up tomorrow my sitemap will be 404 again…
2- I am sure it is in the right place, I can see the sitemap.
3- The XML Sitemap Validator tool also confirmed this.
4- There is no plugin conflict.
5- As I mentioned, my server configurations are at a very high level, you can check it from the link I sent you https://imgur.com/a/4mGtZED.
I also tried reducing the number of pages in the sitemap from 200 to 199, which is a temporary solution, not a permanent one.
I also tried different solutions, maybe the sitemaps loaded per page are too many, I created 120 page sitemaps right now, but the problem is still not solved?
Hello,
You mentioned that you’re using Rank Math PRO but the account you have used to open this ticket is the Rank Math free version.
Can you please search and forward a receipt from FastSpring.com or the email address you used to purchase so we can locate your account and verify it?
Regarding the issue, if changing the links per sitemap fixed the issue, then your sitemaps are still cached.
You should 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/
Also, disable the transient cache for the sitemap by applying this filter. This will make sure that your XML sitemap always reflects the latest changes on your site:
/**
* 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’re not sure how to add this code, you can follow this guide:
https://rankmath.com/kb/wordpress-hooks-actions-filters/
Looking forward to helping you.
Hello,
I use the litespeedcache plugin as a caching plugin on my site. I had already activated the caching of the sitemap in the plugin by reading your documentation.
However, I will still place the code you gave me on my site and follow the process. If my sitemap file does not give a 404 error when I wake up tomorrow, I will update the topic.
Hello,
I added the code you gave me to my site and waited 1 day as I said. When I woke up this morning and checked my sitemap, I came across a 404 page again…
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/
Looking forward to helping you.
Thank 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.