Hello,
We apologize for the issue you are facing with your sitemap. It sounds like you’ve already taken some important troubleshooting steps. Since the categories are returning a 404 error, here are a few additional things you can check:
-
Flush Permalinks Again: Sometimes, flushing permalinks multiple times can help. Go to Settings → Permalinks in your WordPress dashboard and click Save Changes again, even if you haven’t made any changes.

-
Check .htaccess File: If you are using an Apache server, ensure that your .htaccess
file has the correct rewrite rules for Rank Math. You can add the following code to your .htaccess
file:
# START of Rank Math Sitemap Rewrite Rules
RewriteEngine On
RewriteBase /
RewriteRule ^sitemap_index.xml$ /index.php?sitemap=1 [L]
RewriteRule ^([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 [L]
RewriteRule ^([a-z]+)?-?sitemap.xsl$ /index.php?xsl=$1 [L]
# END of Rank Math Sitemap Rewrite Rules
-
Nginx Configuration: If you are using Nginx, make sure your Nginx configuration file has the appropriate rewrite rules as follows:
# 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: Sometimes, other plugins can interfere with the sitemap functionality. You can use the Health Check plugin to identify any potential conflicts.
-
Check Robots.txt: Ensure that your robots.txt
file is not blocking these taxonomies. You can check this in Rank Math SEO → General Settings → robots.txt.
-
Custom Canonicals: If you have set custom canonical URLs for these taxonomies, they may not appear in the sitemap. Consider removing those custom canonicals to see if it resolves the issue.
After checking these points, please try accessing your sitemap again. If the problem persists, please reply to this ticket, and a human agent from the Rank Math Support team will assist you further.
Thank you for raising this concern!
Sources:
Rank Math Sitemap Issues and Their Fixes » Rank Math
Additional information:
– I am on a litespeed server and have excluded the sitemap from being cached in the litespeed plugin.
– There are no canonicals set up.
– There is an error from Google that those 2 taxonomies cannot be indexed because they are in html only. There is no xml version (which is true because when I view xml, it returns a 404).
Hello,
Please apply the following filter to your site to disable the transients cache for the sitemap and see if that works for you.
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/
If the issue persists, then 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/
Let us know how it goes. 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.