Can’t exclude post from sitemap

#1098898
  • Resolved Webvirtuoso
    Rank Math free

    I’ve added the post ID to the exclude posts field but it still shows in the page-sitemap.xml

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello,

    We apologize for the issue you are facing with excluding posts from the sitemap. Here are a few steps to ensure that the exclusion works correctly:

    1. Check Post ID: Make sure that you are using the correct Post ID. You can find the Post ID by editing the post and checking the URL in your browser. It should look like this: yourwebsite.com/wp-admin/post.php?post=1&action=edit, where 1 is the Post ID.

    2. Exclude Posts Field: Ensure that you have entered the Post IDs in the Exclude Posts field correctly, separated by commas if there are multiple IDs.

    3. Clear Cache: If you are using any caching plugins, clear the cache after making changes to the sitemap settings. Sometimes, cached versions of your sitemap may still show the posts.

    4. Sitemap Settings: Double-check your sitemap settings under Rank Math SEO → Sitemap Settings to ensure that everything is configured correctly.

    If you’ve followed these steps and the issue persists, please reply to this ticket with your site URL so we can assist you further. A human agent from our team will take over and help resolve this issue for you.

    Thank you for raising this concern!

    Sources:
    How to Configure Sitemaps in Rank Math – Best Settings and Tips

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    I’ve done all of that, cleared caches, the URL I want to hide is still in the sitemap:

    https://www.derbyminibus.com/page-sitemap.xml

    Hello,

    Thank you for contacting us. We apologize for any inconvenience that may have been caused.

    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 a filter/hook to your WordPress site:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Once done, clear your website cache and check the sitemap again.

    Let us know how it goes. We look forward to hearing from you.

    Thank you.

    I tried all steps but this one:

    add_filter( ‘rank_math/sitemap/enable_caching’, ‘__return_false’);

    Added to functions.php was the resolution.

    Thanks

    Hello,

    Glad that helped.

    If you have any other concerns, please don’t hesitate to contact us anytime so we can assist you further.

    Looking forward to helping you.

Viewing 6 replies - 1 through 6 (of 6 total)

The ticket ‘Can’t exclude post from sitemap’ is closed to new replies.