Hello,
Thanks for contacting Rank Math support. We apologise for any inconvenience this might have caused you.
Please follow the steps below to see if it works for you.
#1. Flush the Sitemap cache by following this video screencast:
https://i.rankmath.com/pipRDp
#2. Exclude the Sitemap files of the Rank Math plugin in your caching plugin. The cache could be via a plugin or from the server. For plugins or Cloudflare, please follow this article:
https://rankmath.com/kb/exclude-sitemaps-from-caching/
#3. If the above steps doesn’t seem to work, kindly apply the following filter code to your site.
add_filter( 'rank_math/sitemap/enable_caching', '__return_false');
Here’s how you can add filter/hook to your WordPress site:
https://rankmath.com/kb/wordpress-hooks-actions-filters/
Once done, please clear your website cache, remove all the submitted sitemaps, and resubmit only the main sitemap in the Search Console and see if that works for you.
Let us know how it goes. We look forward to hearing from you.
Thank you.
hi
i have always done all steps mentioned above in your response in all of my 8 x sites with sometimes having to do flush and permalinks a few times before google can read the sitemap.(many troubles)
———using the wordpress FROST theme on
———-full NGINX server with following options
client_max_body_size 100M;
location = /robots.txt {
try_files $uri $uri/ /index.php?$args;
}
location / {
try_files $uri $uri/ /index.php?$args;
}
# Add trailing slash to */wp-admin requests.
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
location ~* \.(jpg|jpeg|png|gif|css|js|ico)$ {
expires max;
log_not_found off;
}
————i am using litespeed cache and the sitemaps are excluded from caching
/(.*)sitemap(.*).xml
/(.*)sitemap.xsl
/sitemap_index.xsl
/sitemap_index.xml
——–Rankmath was updated today and i did not find similar troubles after the update
sending sitemap to google worked immediately
however i did clear rankmath cache and updated permalinks before sending to google
i will update again when having sitemap troubles again
———–worth mentioning could be related to sitemap problems
after removing the physical Robots.txt.file on a new wordpress install, the default rankmath robots config does not show immediately(it only shows “allow *”)
only after clicking “save changes” in Rankmath Robots screen after removing “Robots.txt” then only the config updates
i did not find any instructions at your site how to do it properly
regards
i had again the same sitemap error from google
sitemap cannot be read
i did all items that you mentioned above and none off those made any difference.
i have disabled AI module in all sites as it is in my way everywhere and i cannot use it because it is a paid item
then i copied the Rankmath suggested Robots.txt items and inserted them manually into rankmath robots editor
THAT WORKED
now google could read my sitemap
the problem therefore lies in the virtual Robots file of Rankmath.
i have suspected it might be the robots
that should help you resolve the issue
Hello,
Rank Math does not create a physical robots.txt file on your site. Instead, the file is created and displayed when a user visits your robots.txt URL.
Our plugin, like other SEO plugins on the market, uses virtual files for the sitemaps and robots.txt file. Search engines work fine with this behavior, and that’s why our plugin, like other SEO plugins, uses this method.
Kindly ensure there is no static robots.txt file in your site’s root folder.
Don’t hesitate to get in touch if you have any other concerns.
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.