Hello,
I apologize for the issue you are facing with broken internal links from deleted pages in your sitemap. To remove deleted pages from your sitemap, you can follow these steps:
-
Check Your Sitemap: First, ensure that the deleted pages are indeed still listed in your sitemap. You can access your sitemap at https://yourdomainname/sitemap_index.xml.
-
Remove the Deleted Pages: If the deleted pages are still appearing in your sitemap, you may need to regenerate your sitemap. Rank Math automatically updates the sitemap when you delete a post or page, but if it’s not reflecting correctly, you can try the following:
- Go to Rank Math > Sitemap Settings in your WordPress dashboard.
- Click on the Save Changes button to regenerate the sitemap. This should remove any deleted pages from the sitemap.
-
Resubmit Your Sitemap: After regenerating your sitemap, it’s a good idea to resubmit it to Google Search Console to ensure that Google is aware of the changes. You can do this by going to Google Search Console, selecting your property, and navigating to Sitemaps. Enter your sitemap URL and click Submit.
-
Check for Internal Links: To fix broken internal links, you may want to check your website for any remaining links pointing to the deleted pages. You can use tools like SEMrush or other link checkers to identify these links and update or remove them accordingly.
If you continue to experience issues or if the deleted pages still appear in your sitemap after following these steps, please reply to this ticket, and a human agent from the Rank Math Support team will assist you further.
Thank you for raising this concern!
Sources:
Rank Math Sitemap Issues and Their Fixes » Rank Math
Hello,
Thank you for contacting us and sorry for any inconvenience that might have been caused due to that.
Rank Math should automatically remove the deleted pages from your sitemap. In this case, please share some affected URLs that are still showing on your sitemap so that we can check the issue further for you.
Meanwhile, please try to follow the steps below and see if that works for you:
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/
Let us know how it goes. Looking forward to helping you.
Thank 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.