Hello,
We apologize for the issue you are facing with the HTML sitemap displaying draft pages. The discrepancy between your HTML sitemap and the page sitemap can occur due to several reasons:
-
Draft Pages Visibility: The HTML sitemap may include pages that are set to draft status if the settings allow it. Ensure that your HTML sitemap settings are configured to exclude draft pages. You can check this in the Rank Math settings under Rank Math SEO → Sitemap Settings → HTML Sitemap.
-
Caching Issues: Sometimes, caching plugins can cause outdated information to be displayed. Make sure to clear your cache and check if the issue persists.
-
Custom Canonicals: If you have set custom canonical URLs for any of your posts or pages, those might not appear in the HTML sitemap. Ensure that you are not using custom canonicals that could affect visibility.
-
Plugin Conflicts: There might be a conflict with another plugin affecting how the HTML sitemap is generated. You can use the Health Check plugin to identify any potential conflicts.
To ensure your HTML sitemap matches the page sitemap:
- Go to Rank Math SEO → Sitemap Settings → HTML Sitemap and review the options available.
- Make sure to toggle off any settings that might include draft pages.
- After making changes, clear your cache again and check the HTML sitemap.
If you continue to experience issues, 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! We hope this helps resolve your issue soon!
Hello,
Thank you for contacting us and sorry for any inconvenience that might have been caused due to that.
Can you 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/
3. If the above steps don’t seem to work, kindly apply the following filter to your site.
add_filter( 'rank_math/sitemap/enable_caching', '__return_false');
Here’s how you can add filter/hook to your WordPress site:
https://rankmath.com/kb/wordpress-hooks-actions-filters/
Let us know how it goes. Looking forward to helping you.
Thank you.
Many thanks for this. Flushing the sitemap cache sorted the problem 👍
Thanks again
Graeme
Hello,
We are glad to know that this issue has been resolved. Thank you for letting us know.
This ticket will be closed now, but you can always open a new one if you have any other questions or concerns. We are here to help you with anything related to Rank Math.
We appreciate your patience and cooperation throughout this process.
Thank you for choosing Rank Math.