Hello,
We apologize for the issue you are facing with your sitemap. A 404 error when accessing your sitemap can often be resolved by flushing your permalinks. Here’s how you can do that:
- Go to your WordPress admin area.
- Navigate to Settings → Permalinks.
- Click the Save Changes button, even if you didn’t make any changes on the page.

This should help resolve the 404 error. If the issue persists, please check if your server is configured correctly to handle the sitemap. You may need to add rewrite rules to your .htaccess
file if you are using an Apache server or your Nginx configuration file if you are using Nginx.
For Apache, 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
For Nginx, add the following code to your configuration file:
# 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
If you continue to experience issues, please reply to this ticket with any relevant details or access permissions needed for us to assist you further. A human agent from our support team will take over and provide more specific guidance.
Thank you for raising this concern, and we look forward to helping you resolve it!
Sources:
Rank Math Sitemap Issues and Their Fixes » Rank Math
Hello,
You seemed to have marked this ticket as resolved.
We’re just following up with you to see if you have any other questions or concerns that we can assist you with. Or, if your issue has been resolved, please let us know so we can mark this ticket as closed.
Thank you for choosing Rank Math.