Hello,
We apologize for the issue you are facing with deleted WooCommerce products still appearing in your product sitemap. It can be frustrating when changes do not reflect as expected.
To ensure that deleted products are fully removed from your sitemap, please follow these steps:
-
Check Product Status: Ensure that the products are indeed marked as deleted and not just set to draft or pending.
-
Re-save Sitemap Settings: Go to Rank Math > Sitemap Settings and click on the Save Changes button again to refresh the sitemap settings.
-
Clear Cache: If you are using a caching plugin, make sure to clear the cache after making changes. Sometimes, cached versions of the sitemap can display outdated information.
-
Check for Transients: You mentioned you cleared Rank Math transients, but it might be worth checking if there are any other caching mechanisms in place that could be affecting the sitemap.
-
Regenerate Sitemap: If the above steps do not work, you can try regenerating the sitemap by going to Rank Math > Sitemap Settings and toggling the sitemap off and then back on.
If you have followed all these steps and the issue persists, please reply to this ticket with your site URL so that a human agent from our support team can assist you further.
Thank you for raising this concern, and we appreciate your patience as we work to resolve it!
Sources:
How to Configure Sitemaps in Rank Math – Best Settings and Tips
This is an automated reply from Rank Math Support Bot. Your ticket has been assigned to a human agent and we will get back to you shortly.
Hi Rank Math team,
I’ve followed all the recommended steps but deleted products are still showing in the product sitemap.
Example still appearing:
Sitemap URL: https://www.cosmetology.co.za/product-sitemap34.xml
Deleted product URL: https://www.cosmetology.co.za/shop/skincare/serums-treatments-ampoules/cosrx-hydrium-triple-hyaluronic-moisture-ampoule-40ml/
What I have already done:
Confirmed the product is fully removed from WordPress (not in trash, draft, or pending).
Re-saved Sitemap Settings (Rank Math → Sitemap Settings → Save Changes).
Cleared all caches: WP Rocket, server-side cache (Varnish), and Cloudflare.
Cleared Rank Math transients and internal caches.
Tested bypassing caches with ?nocache=1 — the deleted product still appears in the sitemap.
Despite all this, the deleted product URL is still included in the sitemap.
Request:
Could you please advise if Rank Math maintains any additional sitemap cache or legacy index that needs clearing, or if there’s a way to force a complete rebuild of all product sitemap files? Any WP-CLI command or debug mode to trace why a deleted product is still being listed would also help.
Thanks for your assistance — looking forward to resolving this.
Best regards,
Vikas
Hello,
For troubleshooting, head over to your website files /uploads/rankmath/, and delete any XML files from that path.
If the issue persists, try updating the plugin to the beta version, as we have included a fix for sitemap caching issues.
Here’s a guide you can follow:
https://rankmath.com/kb/version-control/#beta-updates
Let us know how this goes.