“Sitemap shows X-Robots-Tag: noindex conflict due to Rank Math”

#1101523
  • Hello Rank Math Team,

    I am experiencing an issue where my sitemap is being excluded from indexing due to an X-Robots-Tag: noindex header.

    Hosting: Cloudways (Nginx + Apache hybrid setup)

    Action taken so far:

    Cleared all caches (Cloudways, WordPress, plugins like Hummingbird/Smush).

    Set custom domain correctly (wp.onedailys.com).

    Flushed WordPress cache via WP-CLI.

    Reinstalled and reconfigured Rank Math plugin.

    Confirmed .htaccess rule is forcing index, follow successfully.

    Despite this, the sitemap (/sitemap_index.xml) still shows two conflicting X-Robots-Tag headers:

    One from .htaccess (index, follow)

    Another added by Rank Math plugin (noindex)

    Cloudways support has confirmed the issue is not server-side and recommended contacting Rank Math.

    Could you please check why Rank Math is injecting the noindex header into the sitemap, and provide a solution to disable or override this behavior?

    Thank you for your support.

Viewing 1 replies (of 1 total)
  • Hello,

    We apologize for the issue you are facing with your sitemap being excluded from indexing due to the conflicting X-Robots-Tag headers. It seems that there might be a configuration conflict causing Rank Math to inject the noindex header into your sitemap.

    Here are a few steps you can take to troubleshoot and potentially resolve this issue:

    1. Check Rank Math Settings: Go to Rank Math > Sitemap Settings and ensure that the settings for your sitemap are configured correctly. Make sure that the option to include your sitemap in search engine indexing is enabled.

    2. Disable X-Robots-Tag in Rank Math: If you want to override the behavior of Rank Math injecting the noindex header, you can add a filter in your theme’s functions.php file to disable it. You can use the following code:

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

      This will prevent Rank Math from caching the sitemap, which might help in resolving the conflict.

    3. Check for Other Plugins: Sometimes, other SEO or caching plugins can interfere with Rank Math’s functionality. Ensure that no other plugins are adding conflicting headers.

    4. Review .htaccess Rules: Since you mentioned that your .htaccess rule is forcing index, follow, double-check that there are no other rules that might be conflicting with this setting.

    5. Contact Support: If the issue persists after trying these steps, please reply to this ticket with your site URL so that a human agent from our support team can take a closer look at your specific setup and provide further assistance.

    Thank you for raising this concern, and we appreciate your patience as we work to resolve it!

    Sources:
    Can I NoIndex PDF Files Using an SEO Plugin? » Rank Math
    How to Fix "Incorrect HTTP Header Content-Type" Error in Sitemaps » 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.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this ticket.