-
Hi, I’ve read all the Rankmath posts on sitemaps and 404s. I’ve tried the suggestions. I’ve had my prestigious Pressidium hosting support look into this as well.
The sitemaps will work, but after a while will start 404’ing. I refresh permalinks and clear cache. They work. Some time later, 404 again. We followed https://rankmath.com/kb/fix-sitemap-issues/ and added the rewrite rules, but this did not help.
# 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; # END Nginx Rewrites for Rank Math Sitemaps
Caching is excluded for those pages (you can verify by viewing the network headers).
Pressidium said:
“We have reproduced the issue. We have tried the solution on the 2nd and we had proceeded to add the rewrite rules manually but the issue persists.
We have check the settings of the plugin
WP-Rocket
to ensure that there is no issue with the cache of the aforementioned plugin.Also, we proceeded to add the code to the
functions.php
of your theme that mentioned in the article on the URL below:
https://support.rankmath.com/ticket/in-sitemap-page_sitemap-xml-404-error/But the issue still persists.
We have revert back that change and we have removed the rewrite rules mentioned in our previous message. We have followed every step from the plugin’s Support and we have review plenty of the articles from
https://support.rankmath.com/ticket/
that are relative to this.We reviewed our configuration on the cache exclusions and everything is as it should be.
We suggest that you contact the Rank Math support regarding the sitemap issue.”
The ticket ‘Sitemaps continually revert to 404. Permalinks reset. Cached cleared.’ is closed to new replies.