Hello, I’m sorry to hear that you’re experiencing issues with excluding posts from your sitemap. It’s important to ensure that the post IDs are entered correctly and separated by commas. If you’ve already done this and the excluded posts are still appearing in the sitemap, there might be an issue with the exclusion process.
To troubleshoot this, please ensure that the post IDs are entered without any spaces between them and that they are accurate. Additionally, make sure that you have clicked on “Save Changes” after adding the post IDs.
If the issue persists, please provide us with the specific post IDs you are trying to exclude, and we’ll be happy to investigate this further for you.
Thank you for bringing this to our attention, and we appreciate your patience as we work to resolve this issue for you.
Sources:
How to Exclude Content From Sitemap » Rank Math
How to Configure Sitemaps in Rank Math – Best Settings and Tips
HI there,
Unfortunately, the posts are still appearing, even though I’m both adding them to exclude posts and terms, and also “No Index” on the SEO on each page
The post IDs are:
29213,27806,28238,28455,28879,29079,29079,28963,29031,28096,28741,28160,28693,28367,27504,27536,27806,27823,27917,27787,28645,27930,28142,28544,27576,28238,27693,25352,27444,28455,28531,27112,29031
Hello,
Could you please share the URLs that should not be appearing in your sitemap so we can check?
Meanwhile, please follow these steps to flush your sitemap cache:
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. Disable the transient cache for the sitemap by applying this filter. This will make sure that your XML sitemap always reflects the latest changes on your site:
/**
* Filter if XML sitemap transient cache is enabled.
*
* @param boolean $unsigned Enable cache or not, defaults to true
*/
add_filter( 'rank_math/sitemap/enable_caching', '__return_false');
If you’re not sure how to add this code, you can follow this guide:
https://rankmath.com/kb/wordpress-hooks-actions-filters/
Let us know how this goes.
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.