Hello,
We apologize for the issue you are facing with your sitemaps showing a 404 error. Since you are using an Nginx server and have already added the necessary rewrite rules, there are a couple of additional steps you can take to resolve this issue:
-
Flush Permalinks: Sometimes, simply flushing the permalinks can resolve 404 errors. To do this, go to your WordPress admin area, navigate to Settings → Permalinks, and click the “Save Changes” button without making any changes. This can help refresh the permalink structure.

-
Check Sitemap Settings: Ensure that all post types you want to include in your sitemap are enabled. You can check this by going to Rank Math SEO → Sitemap Settings in your WordPress admin area.
-
Verify Nginx Configuration: Double-check that the rewrite rules you added to your Nginx configuration file are correct and saved properly. Here’s the code snippet again for reference:
# START Nginx Rewrites for Rank Math Sitemaps
rewrite ^/sitemap_index.xml$ /index.php?sitemap=1 last;
rewrite ^/([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
rewrite ^/([a-z]+)?-sitemap.xsl$ /index.php?xsl=$1 last;
# END Nginx Rewrites for Rank Math Sitemaps
-
Check for Plugin Conflicts: If the issue persists, consider checking for any plugin conflicts that might be affecting the sitemap functionality. You can use the Health Check plugin to help identify any conflicts.
If you’ve tried these steps and are still experiencing issues, please reply to this ticket with any error messages or additional details, and a human agent from our support team will assist you further. Thank you for your patience!
Sources:
Rank Math XML Sitemaps on NGINX Servers » Rank Math
Rank Math Sitemap Issues and Their Fixes » Rank Math
Hello,
Thank you for your query and we are so sorry about the trouble this must have caused.
We checked your sitemap and it seems to be working just fine.
Please follow the steps below:
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. Apply the following filter code to your site.
add_filter( 'rank_math/sitemap/enable_caching', '__return_false');
Here’s how you can add filter to your WordPress site:https://rankmath.com/kb/wordpress-hooks-actions-filters/
If the issue persists on your end, let us know here and we’ll assist you further.
Looking forward to helping you.