Hello,
We apologize for the issue you are facing with your sitemap returning a 404 error after the latest Rank Math update. Since you’ve already tried several troubleshooting steps, we recommend checking a few additional things:
-
Flush Permalinks: You mentioned re-saving permalinks, but ensure you do this by navigating to Settings → Permalinks in your WordPress admin area and clicking the "Save Changes" button again, even if no changes were made.
-
Check Server Configuration: Since you are using a child theme of Astra, ensure that there are no custom rules in your child theme’s functions.php
file that might be affecting the sitemap. Additionally, if you are on an Apache server, make sure your .htaccess
file includes the necessary rewrite rules for Rank Math. Here’s a reminder of what those rules should look like:
# 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, ensure that the following rewrite rules are added to your Nginx configuration:
# 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: Although you’ve disabled other plugins, it might be worth checking again with the Health Check plugin to ensure there are no hidden conflicts.
-
Server Logs: Check your server logs for any errors that might give more insight into why the sitemap is returning a 404 error.
If these steps do not resolve the issue, please reply to this ticket with any additional details or error messages you may find, and a human agent from the Rank Math Support team will assist you further. Thank you for your patience!
Sources:
Rank Math Sitemap Issues and Their Fixes » 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.
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.