Hello,
We apologize for the inconvenience you’re experiencing with your sitemap. We understand that it can be frustrating, especially when you have a large number of pages not loading in the sitemap.
Based on the information you’ve provided, it seems that you’re using an NGINX server and are encountering issues with your sitemap. We recommend adding the rewrite rules manually to your NGINX configuration file to resolve this issue. However, we understand that this may be a bit technical for you.
To address this, we recommend reaching out to your hosting provider for assistance with adding the necessary rewrite rules to your NGINX configuration file. They should be able to help you with this process and ensure that your sitemap loads correctly.
If you continue to experience issues after adding the rewrite rules, please feel free to reply to this ticket, and our support staff will be happy to assist you further.
Thank you for bringing this to our attention, and we appreciate your patience as we work to resolve this issue for you.
Kind regards.
Sources:
Rank Math Sitemap Issues and Their Fixes » Rank Math
Hello,
Thank you for contacting Rank Math and sorry for the issue you are facing.
As you’re using an Nginx server, you need to add the following rewrite rules to fix this:
# 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’re not sure about adding these rules, please get in touch with your server administrator or hosting support, and they will be able to help you out.
Hope that helps.
Thank you.
Jitendra did you even read my full message? I just gave you my server administrator’s response. I need help.
Hello,
Can you please share the issue you are having with your sitemap? This would help us suggest the appropriate action to help resolve it.
Adding that NGINX code is only useful when your sitemap is working fine on the ?sitemap=1
version but is not working on the /sitemap_index.xml
version. The code is to rewrite the sitemap URL from ?sitemap=1
to /sitemap_index.xml
.
So please first visit yourdomain.com?sitemap=1 to see if it works fine. If it does work but is not working on /sitemap_index.xml
, then please ask the WordPress team to add the code to your nginx.conf
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
You can refer them to this page for more information about the code and what it does: https://rankmath.com/kb/xml-sitemaps-nginx/
We hope this helps clarify the issue. If you have any other questions or concerns, please feel free to contact us again. We are always happy to assist 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.