Noindex issue

#1104475
  • Hi RankMath Support,

    I’m experiencing an issue with my sitemap at:
    https://the500.website/sitemap_index.xml

    Problem:
    Google Search Console reports: Couldn’t fetch sitemap.
    Upon inspection, the sitemap HTTP headers include:

    x-robots-tag: noindex

    This prevents Google from reading the sitemap, even though all pages are indexed.

    Steps already taken:

    Verified WordPress Settings → Reading → “Discourage search engines” is unchecked.

    Checked RankMath Sitemap Settings — posts and pages are included; attachments are excluded.

    Disabled NitroPack (caching/optimization plugin) — the noindex header persisted.

    Confirmed with the hosting provider that Nginx is not adding the header.

    Inspected HTTP headers in browser — x-robots-tag: noindex is coming from RankMath.

    Request:
    Please advise how to disable the noindex HTTP header for the sitemap so that Google Search Console can fetch it successfully.

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

    We apologize for the issue you are facing with your sitemap. It seems that the x-robots-tag: noindex header is preventing Google from fetching your sitemap, which can be quite frustrating.

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

    1. Check Rank Math Settings: Ensure that your sitemap settings in Rank Math are configured correctly. Go to Rank Math SEO → Sitemap Settings and verify that the settings for your posts and pages are set to index.

    2. Exclude Sitemap from Caching: Since you mentioned that you disabled NitroPack, ensure that there are no other caching mechanisms in place that might be affecting your sitemap. You can also add a filter to your theme’s rank-math.php file to exclude the sitemap from caching:

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

      After adding this code, save the changes and check your sitemap again.

    3. Check Robots Meta Tag: Ensure that the robots meta tag for your sitemap is not set to noindex. You can do this by navigating to Rank Math SEO → Titles & Meta and ensuring that the settings for your posts and pages allow indexing.

    4. Inspect HTTP Headers: Use a tool like httpstatus.io to inspect the HTTP headers of your sitemap again after making these changes. Ensure that the x-robots-tag header is no longer set to noindex.

    5. Resubmit Your Sitemap: Once you have made the necessary changes, resubmit your sitemap in Google Search Console as described in our tutorial here.

    If you continue to experience issues after following these steps, we recommend replying to this ticket so a human agent from our support team can assist you further. Please include any additional details or changes you’ve made.

    Thank you for bringing this concern to our attention, and we hope to help you resolve it soon!

    Sources:
    Troubleshooting the “Couldn’t Fetch” Error in Google Search Console » Rank Math
    Why the Sitemap_Index.xml is Throwing a 404 Error » 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. Your ticket has been assigned to a human agent and we will get back to you shortly.

    Hi RankMath Dev Team,

    I’m still experiencing a critical issue with my sitemap:
    Sitemap URL: https://the500.website/sitemap_index.xml

    Problem:
    Google Search Console cannot fetch the sitemap. HTTP headers show:

    x-robots-tag: noindex

    This is blocking indexing of my sitemap, even though all pages are correctly set to index.

    Steps already taken (all recommended by RankMath Support):

    Added filters in Code Snippets:

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

    Cleared all caches, including NitroPack and host-level caching.

    Deactivated all other plugins except RankMath.

    Confirmed WordPress “Discourage search engines” is unchecked.

    Verified Posts and Pages are set to index in RankMath Sitemap Settings.

    Temporarily switched to a default theme.

    Result: The x-robots-tag: noindex persists.

    Impact: Google cannot fetch my sitemap, which may delay indexing of all pages.

    Request:
    Please provide a definitive solution, whether it’s:

    A working filter to remove x-robots-tag: noindex from all sitemaps

    A RankMath update or setting that resolves this issue

    I can provide access or further technical details if required.

    Thank you for urgent assistance,

    [Domain: the500.website]

    Hello,

    Thank you for reaching out to us.

    We understand your concern about the sitemap being set as ‘noindex’, but we assure you that this is how it should be.

    The reason is that we don’t want Google to index the sitemap itself, we only want them to index the pages and posts that are listed on the sitemap. The sitemap is just a way to tell Google what pages and posts you have on your website, not a page that you want to show up in search results.

    The important thing is that your pages and posts are set to ‘index’, which means that they are eligible to appear in Google search results.

    You can check this by looking at the Rank Math settings on each page or post, or by using the Google URL Inspection tool.

    To make sure that Google knows about your sitemap and can crawl your pages and posts, you need to submit your sitemap to Google Search Console.

    This is a simple process that you can follow by using our tutorial: https://rankmath.com/kb/submit-sitemap-to-google/

    Hope that helps and please don’t hesitate to let us know if you have any other questions.

    Thank you.

    I don’t believe that I explained correctly. The “Couldn’t Fetch” error is being reported by Google Search Console itself.

    Hello,

    Please follow this guide to troubleshoot the couldn’t fetch issue: https://rankmath.com/kb/couldnt-fetch-error-google-search-console/

    If everything is fine on your end, and Google still returns the error, please note that not all sitemaps are processed by Google. Not necessarily because there is something wrong with the sitemap.

    Even a perfect sitemap may not be processed by Google.

    Most of the time, it’s still sitting in the queue waiting for processing. Remember, Google is processing millions of sitemap daily, sometimes it takes time to get to yours. But for whatever reason, Google never gets around to some sitemaps. It just doesn’t think it is worth it.

    And Search Console sometimes shows ‘Pending’ as ‘couldn’t fetch’ incorrectly. You can check the replies of Google experts for the Couldn’t Fetch(especially for the TLDs except for .com) issues on the following threads:
    https://support.google.com/webmasters/thread/29055233/missing-xml-sitemap-data-in-google-search-console-for-tld-domain?hl=en
    https://support.google.com/webmasters/thread/31835653/sitemap-couldn-t-fetch-sitemap-couldn-t-be-read-by-google-search-console?hl=en

    Let us know how that goes. Looking forward to helping you.

    This is the first time that I have experienced this, 300+ websites later, the issue has been ongoing on this site for 2 weeks as I myself assumed what you just replied with.

    Hello,

    We sincerely apologize for any inconvenience that might have been caused due to that.

    We checked your sitemap again, but were not able to find any issues there:

    However, if you still want to set your sitemap to index, you can use the following filter on your website:

    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/

    After applying the filter, please clear your sitemap cache by following this screencast: https://i.rankmath.com/pipRDp

    Let us know how it goes. Looking forward to helping you.

    Thank you.

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

You must be logged in to reply to this ticket.