Exclude Posts from Sitemap

#798795
  • Resolved Anonymous
    Rank Math free

    Good morning

    We are using the Rankmath sitemap. We have manually inserter some pages and posts to be excluded from the HTML and XML sitemaps on our site. This seems to work fine for pages but the posts are still showing up in the sitemap. We have tried to look at some of your documentation and notes this is often a caching issue. We have cleared the cache multiple times and even placed the code snippet your material suggested

    /**
    * 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’);

    But these posts are still showing up in the sitemap. Please advise.

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for reaching out to us regarding the issue with excluding posts from the Rank Math sitemap. I understand that you have followed the steps to exclude posts from the sitemap, including adding the code snippet to disable caching, but the posts are still appearing in the sitemap.

    To further troubleshoot this issue, I recommend checking if the posts are correctly set to “noindex” in the Rank Math settings. Here’s how you can exclude posts from the sitemap:

    1. Navigate to WordPress Dashboard → Rank Math SEO → Titles & Meta → Posts.
    2. Find the post you want to exclude and ensure that the “Include in Sitemap” option is disabled.
    3. Additionally, check the individual post settings to confirm that the “Index” option is set to “No” in the Advanced tab.

    If you have already performed these steps and the posts are still showing up in the sitemap, please ensure that there are no conflicting settings or plugins causing this issue.

    If the problem persists after checking these settings, please reply to this ticket, and a human agent from our support team will assist you further.

    We appreciate your patience and cooperation in resolving this matter. Thank you for using Rank Math for your SEO needs.

    Sources:
    Why the Sitemap_Index.xml is Throwing a 404 Error » Rank Math
    How To Exclude Rank Math Sitemaps from Caching » Rank Math
    Rank Math Sitemap Issues and Their Fixes » Rank Math
    Why Isn’t My URL Included in the Sitemap? » Rank Math
    How to Exclude Content From Sitemap » Rank Math

    This is an automated reply from Rank Math Support Bot. If you need further assistance, please reply to this topic and a human support agent will reply to you shortly.

    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.

Viewing 1 replies (of 1 total)

The ticket ‘Exclude Posts from Sitemap’ is closed to new replies.