Sitemap Blocked from Indexing – X-Robots-Tag: noindex Issue

#1033900
  • Resolved Sagar kumar
    Rank Math free

    Hello Rank Math Support,

    I’m currently facing an issue where Google Search Console cannot index my sitemap located at:

    https://thelearnnova.com/sitemap_index.xml

    After testing using both Google’s Inspection Tool and external HTTP header analyzers, I’ve discovered that this URL is returning the following HTTP response header:

    X-Robots-Tag: noindex

    Due to this header, Google is unable to index the sitemap, which is impacting my site’s SEO. I have not manually added this directive via .htaccess, theme files, or plugin settings. This suggests the header may be coming from server-level configuration, CDN caching, or potentially a setting within the Rank Math plugin.

    Could you please assist with the following:

    Confirm if Rank Math is applying the X-Robots-Tag: noindex header to .xml files such as the sitemap, either by default or due to a misconfiguration.

    Provide guidance on how to disable or override this behavior to ensure sitemap files are indexable by Google.

    Let me know if there are any settings I should review or modify within Rank Math or my WordPress setup.

    Once resolved, I will proceed to re-submit the sitemap in Google Search Console.

    Thank you in advance for your assistance. Please let me know if you need further details from my end.

    Kind regards,
    [Your Name]
    Website: https://thelearnnova.com

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

    We apologize for the issue you are facing with your sitemap being blocked from indexing due to the X-Robots-Tag: noindex header. This can indeed impact your site’s SEO, and we appreciate you bringing this to our attention.

    Confirming Rank Math’s Behavior

    Rank Math does not apply the X-Robots-Tag: noindex header to XML files like sitemaps by default. If you are seeing this header, it is likely due to server-level configurations, CDN settings, or possibly a conflict with another plugin.

    Steps to Resolve the Issue

    Here are some steps you can take to troubleshoot and resolve this issue:

    1. Check Server Configuration: If you have access to your server settings, check if there are any directives in your server configuration files (like .htaccess for Apache or nginx.conf for Nginx) that might be adding this header.

    2. Review CDN Settings: If you are using a CDN, check its settings to see if it is adding the X-Robots-Tag: noindex header to your sitemap URL. You may need to adjust the settings or clear the cache.

    3. Disable Other Plugins: Temporarily disable other plugins that might be affecting headers or caching. This can help identify if there’s a conflict causing the issue.

    4. Check Security Plugins: If you have any security plugins installed, they might be adding this header as a precaution. Review their settings and see if there’s an option to exclude the sitemap from such rules.

    5. Exclude Sitemap from Caching: Ensure that your sitemap is excluded from any caching mechanisms. You can refer to our tutorial on how to exclude sitemaps from caching for guidance.

    Next Steps

    After making these checks and adjustments, please test your sitemap again using Google’s Inspection Tool or an external HTTP header analyzer to see if the X-Robots-Tag: noindex header is still present.

    If you continue to experience issues, please reply to this ticket with any additional details or changes you’ve made, and a human agent from our support team will assist you further.

    Thank you for your patience, and we hope this helps resolve your issue!

    Sources:
    Can I NoIndex PDF Files Using an SEO Plugin? » Rank Math

    Hello,

    Please note that RankMath sets the “noindex” tag on your sitemaps by default. It’s done this way because a sitemap is only meant to guide search engines through your site, not to rank in search results.

    The reason you’re seeing it set to “noindex” is to prevent it from appearing in search results, which is the desired behavior.

    You should follow this guide to properly submit your sitemap:
    https://rankmath.com/kb/submit-sitemap-to-google/

    However, if you still wish to remove the noindex tag from your sitemap, you can use the filter on your site:

    add_filter( 'rank_math/sitemap/http_headers', function( $headers ) {
    	if ( '/sitemap_index.xml' !== $_SERVER['REQUEST_URI'] ) {
    		return $headers;
    	}
    	unset( $headers['X-Robots-Tag'] );
    	return $headers;
    } );

    Here’s how you can add a filter/hook to your WordPress site:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Looking forward to helping you.

    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 2 replies - 1 through 2 (of 2 total)

The ticket ‘Sitemap Blocked from Indexing – X-Robots-Tag: noindex Issue’ is closed to new replies.