Hello,
We apologize for the issue you are facing with your sitemap. It seems like there might be a problem with how the sitemap is being generated or accessed. Here are a few steps you can take to troubleshoot the issue:
-
Check for Plugin Conflicts: Sometimes, other plugins can interfere with Rank Math. You can use the Health Check plugin to identify any conflicts.
-
Flush Permalinks: Go to your WordPress dashboard, navigate to Settings → Permalinks, and simply click Save Changes. This can help resolve 404 errors.
-
Validate Your Sitemap: Use the Validate XML Sitemap tool to check if your sitemap is correctly configured.
-
Check Server Configuration: If you are using Apache or Nginx, ensure that the necessary rewrite rules are in place as mentioned in our documentation:
- For Apache, add the following 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 to your config 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
-
Check robots.txt: Ensure that your sitemap URL is not blocked by any rules in your robots.txt
file.
If these steps do not resolve the issue, please reply to this ticket with any error messages you see or additional details about your setup, 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
Troubleshooting the “Couldn’t Fetch” Error in Google Search Console » 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.