Hello,
We apologize for the issue you are facing with the sitemap. To remove the trashed pages from your sitemap, you can follow these steps:
-
Ensure Pages are Trashed: Make sure that the pages you want to remove are indeed in the trash. If they are still published, they will continue to appear in the sitemap.
-
Noindex the Pages: If you want to ensure that these pages do not appear in search results or your sitemap, you can set them to noindex
. You can do this by going to Rank Math SEO → Titles & Meta → Global Meta and enabling the option for Noindex
on the relevant post types.
-
Clear Cache: After making these changes, clear your site cache if you are using a caching plugin. This will help ensure that the changes take effect immediately.
-
Resubmit Sitemap: Finally, go to Rank Math SEO → Sitemap Settings and resubmit your sitemap to Google Search Console to reflect the changes.
If you continue to experience issues or need further assistance, please reply to this ticket, and a human agent from our support team will assist you further. Thank you for raising this concern!
Hello,
In this case, 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/
Also, head over to your website files /uploads/rankmath/, and delete any XML files from that path.
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.