Rank Math Plugin Adding ‘noindex’ to Sitemap Header

#1006060
  • Resolved SOUNDS GOOD
    Rank Math free

    Dear Rank Math Support Team,

    I have identified that the Rank Math plugin is adding a noindex directive to the X-Robots-Tag HTTP header for my sitemap (https://fashionfrenzee.com/sitemap_index.xml). Below is how I isolated the issue:

    Troubleshooting Steps Taken:
    Disabled all plugins → Sitemap loaded without noindex (confirmed via live header checks).

    Re-activated plugins one by one, testing the sitemap after each activation.

    All plugins except Rank Math were enabled → no noindex issue.

    Upon activating Rank Math (last plugin) → noindex reappeared in the header.

    Expected Behavior:
    Search engines should be able to crawl the sitemap (sitemap_index.xml) without restrictions.

    The X-Robots-Tag should not contain noindex.

    Request:
    Could you confirm why Rank Math adds this directive to the sitemap header?

    Please provide a solution to remove it (e.g., a filter hook or setting adjustment).

    Let me know if you need additional details. I appreciate your help!

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

    We apologize for the issue you are facing with the Rank Math plugin adding a ‘noindex’ directive to your sitemap header. Thank you for providing detailed troubleshooting steps; it helps us understand the situation better.

    The ‘noindex’ directive in the X-Robots-Tag for your sitemap can occur due to specific settings or conflicts within the plugin. Here are a few steps you can take to resolve this issue:

    1. Check Sitemap Settings: Ensure that your sitemap settings in Rank Math are configured correctly. Go to Rank Math SEO → Sitemap Settings and verify that everything is set as expected.

    2. Disable Caching: If you have any caching plugins active, ensure that your sitemap is excluded from caching. You can refer to our tutorial on how to exclude sitemaps from caching.

    3. Filter Hook: If the issue persists, you can use the following filter hook in your theme’s functions.php file to remove the noindex directive:

      add_filter( 'rank_math/sitemap/enable_caching', '__return_false' );

      This will disable caching for the sitemap, which may help in resolving the noindex issue.

    4. Check for Custom Canonicals: If you have set custom canonical URLs for your posts, it might affect how they appear in the sitemap. Ensure that there are no conflicting canonical settings.

    If these steps do not resolve the issue, please reply to this ticket with any additional details or specific settings you have configured in Rank Math, and a human agent from our support team will assist you further.

    Thank you for your patience, and we look forward to helping you resolve this issue!

    Sources:
    Rank Math Sitemap Issues and Their Fixes » Rank Math
    How to Fix Submitted URL Marked ‘NoIndex’ Error » Rank Math

    SOUNDS GOOD
    Rank Math free

    Subject: Sitemap “noindex” Issue Persists Despite Following All Recommended Steps

    Dear Rank Math Support Team,

    I’m still facing the noindex issue in the X-Robots-Tag header for my sitemap (https://fashionfrenzee.com/sitemap_index.xml) even after carefully following all your instructions. Here’s what I’ve done so far:

    Verified Sitemap Settings:

    Confirmed that Rank Math’s sitemap settings (Rank Math SEO → Sitemap Settings) are properly configured.

    Disabled Caching:

    Excluded the sitemap from all caching plugins (e.g., WP Rocket, LiteSpeed Cache).

    Cleared all caches (server, CDN, and browser).

    Added the Filter Hook:

    Inserted add_filter( ‘rank_math/sitemap/enable_caching’, ‘__return_false’ ); into my theme’s functions.php (and tested via the Code Snippets plugin).

    Result: The noindex tag still appears in the header.

    Additional Debugging Steps I Took:
    Tested with all plugins disabled except Rank Math → issue persists.

    Switched to a default theme (e.g., Twenty Twenty-Four) → no change.

    Checked server headers (.htaccess/Cloudflare) → no conflicting rules.

    Request:
    Since the issue seems tied to Rank Math’s sitemap system, could you:

    Confirm if this is a known bug?

    Provide an alternative solution (e.g., a different filter or patch)?

    Thank you for your time—I’d appreciate any further guidance!

    Hello,

    Thank you for contacting Rank Math support.

    We have already replied to your other ticket with the same concern. Please continue there so we can avoid duplication.

    I’ll close this one so we can follow up on one thread for efficiency.

    Looking forward to helping you.

    Thank you.

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

The ticket ‘Rank Math Plugin Adding ‘noindex’ to Sitemap Header’ is closed to new replies.