Hello,
We apologize for the issue you are facing with draft posts still appearing in your sitemap. This can happen if the sitemap is not updated after changing the post status. Here are a few steps you can take to resolve this:
-
Clear Cache: If you are using any caching plugins, clear the cache to ensure that the latest version of your sitemap is generated.
-
Regenerate Sitemap: Go to Rank Math > Sitemap Settings and regenerate your sitemap. This should remove any posts that are now in draft status.
-
Check Post Visibility: Ensure that the posts are set to "Draft" and not "Private" or any other status that might affect their visibility in the sitemap.
-
Plugin Conflicts: Sometimes, other plugins can interfere with how Rank Math generates the sitemap. You can check for conflicts using the Health Check plugin.
If these steps do not resolve the issue, please reply to this ticket with your site URL, and a human agent from our support team will assist you further. Thank you for raising this concern!
Sources:
Rank Math Sitemap Issues and Their Fixes » Rank Math
Not sure what they are saying
Hello,
Thank you for your query and we are so sorry about the trouble this must have caused.
Can you please share some of the affected draft post URLs here so we can take a closer look from our end?
In the meantime, please follow the steps below:
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. Apply the following filter code to your site.
add_filter( 'rank_math/sitemap/enable_caching', '__return_false');
Here’s how you can add filter to your WordPress site:https://rankmath.com/kb/wordpress-hooks-actions-filters/
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.