Hello,
Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.
Could you please do the following:
1. Head over to WordPress Dashboard > Settings > Permalinks
Hit the save button once.
2. Go to WordPress Dashboard > Rank Math > Sitemap Settings
Hit the save button once.
Also, ensure that you exclude sitemaps from caching.
https://rankmath.com/kb/exclude-sitemaps-from-caching/
I hope this resolves your issue.
Hello Danial,
Thanks for the reply. I have done the setting and I am confused a bit in a few settings.
1. In the sitemap settings I have included posts, should I include pages too? [https://ibb.co/gmWvzTQ]
2. And the Nginx error (on top) still shows up! [https://ibb.co/gmWvzTQ]
2. Which is the correct way of adding page rule to clodflare?
a. Add sitemap URL with bypass? [https://ibb.co/4Z02TDZ]
b. This is how the code snippet gets added in the page rule, as mentioned in RM link, what is the right way? [https://ibb.co/tHCSRp2]
Hello,
Thanks for contacting us again.
1. You should enable the pages sitemap and if you want to exclude specific pages from being indexed you can control that on a per page basis.
In order to prevent search engines from indexing a specific page all you need to is edit that page and change the meta settings to “No Index”.

2. The info you see at the top is not an error but more like a warning telling you to do that change, if you don’t see the pages loading on your sitemap. You only need to do that step if you actually encounter the error mentioned in the message.
3. You should enter the rule in Cloudflare with the regex expression (Option b).
sitemap?\.xml?
([a-z0-9_\-]*sitemap[a-z0-9_\-]*\xml|xsl)?
([az0-9_\-]*?)sitemap([a-z0-9_\-]*)?.xml
This way Cloudflare will look at your website and find all the files that match that expression. The first option only excludes that one sitemap from being cached.
If you have any other questions that we can assist you with, don’t hesitate to get in touch.
Hello Miguel,
Thanks for the response. n.b. I am not a coder and am confused with the response (my bad)
Can you elaborate it literally, the regex code that needs to go in the cloudflare page rule. I have shared the screen which has 3 options. What exact code should go in the URL part? And then the settings would be ‘cache level’ & ‘bypass’ or something else? https://ibb.co/XD5vW0w
You have mentioned option B.
Does it mean this: https://ibb.co/71HDVYn
OR
this: https://ibb.co/PFtnq1h
or am i totally incorrect?
Kindly guide
Hello,
Thank you for the follow-up.
Could you confirm if there are missing posts in your sitemap? If so, then you’ll need to follow the steps given.
Cloudflare does not cache sitemaps by default, so you won’t have to do anything. However, if you’ve made some changes in the settings that are causing sitemaps to be cached, you can set a page rule inside your Cloudflare account and add the following code snippet.
Here is a guide by Cloudflare on how to use their page rules:
https://support.cloudflare.com/hc/en-us/articles/200172316-How-do-I-include-or-exclude-a-specific-URL-from-Cloudflare-s-page-rules-
I hope that helps. Thank you, and looking forward to your update.
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.