Hello,
We apologize for the issue you are facing with your sitemap not updating in WordPress using Rank Math. Here are some steps you can take to troubleshoot and resolve this issue:
-
Clear Cache: If you are using a caching plugin, ensure that the sitemap is excluded from being cached. Caching can prevent the sitemap from reflecting the latest changes on your site. You can find guidance on how to exclude sitemaps from caching here.
-
Check for Plugin Conflicts: Sometimes, other plugins can conflict with Rank Math. You can use the Health Check plugin to identify any conflicts.
-
Rewrite Rules: Ensure that your server has the correct rewrite rules set up. If you are using an Apache server, you may need to 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 servers, you would need to add similar rules in your Nginx config file.
-
Flushing Sitemaps Cache: If you have previously cached your sitemaps, flushing the cache might help. You can do this through your caching plugin settings.
-
Check for Static Files: Ensure 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.
If these steps do not resolve the issue, we recommend replying to this ticket with your site URL so that a human agent from our support team can assist you further. Thank you for raising this concern!
Sources:
Rank Math Sitemap Issues and Their Fixes » Rank Math
Why the Sitemap_Index.xml is Throwing a 404 Error » Rank Math
This is an automated reply from Rank Math Support Bot. If you need further assistance, please reply to this topic and a human support agent will reply to you shortly.