Hello,
We apologize for the issue you are facing with your sitemap. Since you are using an NGINX server, it is indeed necessary to add specific rewrite rules to your NGINX configuration file to ensure that your sitemap functions correctly. Here’s the code you need to add:
# 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
To check if you need to add these rules, you can visit _yourdomain.com?sitemap=1_
. If this loads your sitemap, then you will need to implement the above rewrite rules.
After adding the rules, make sure to flush your sitemap settings by going to Rank Math SEO → Sitemap Settings in your WordPress admin area and making any minor changes before saving.
If you are unsure how to edit your NGINX configuration file, we recommend contacting your hosting provider for assistance.
Thank you for raising this concern! If you have any further questions or need additional help, feel free to reply to this ticket.
Sources:
Rank Math XML Sitemaps on NGINX Servers » Rank Math
When adding this ?sitemap=1_ the sitemap does not pull up. So we should be good? My issue is when we submit our sitemap on Google Search Console it shows 0 pages discovered.
Hello,
The notice is only there since you’re using Nginx.
If your sitemap is loading fine, then you won’t need to add the code in the notice.
Also, each time Google uses a sitemap to find a URL, the number of discovered URLs increases by one.
Sitemaps are only one of the few methods Google uses to discover your URLs, so it is fine for your articles to be referred to by other URLs on your site.
When the count of the Discovered URLs is zero or does not match your actual sitemap in your Google Search Console, it means Google didn’t use the sitemap to find the URLs.
Here’s a link for more information:
https://rankmath.com/kb/zero-discovered-urls-through-sitemap/
Looking forward to helping 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.