Critical “noindex’ detected in ‘X-Robots-Tag’ http header” error via GSC

#1092196
  • Hi there,

    This is the first time I’ve ever had to reach out to Rank Math with this particular issue, which is very unfortunate and disappointing. For context, my agency has been building WordPress/Elementor websites using the same exact plugins, processes, and procedures religiously without any issues until just recently. I was a week away from upgrading my account when I came across this scenario, so I am hoping a human who specializes in this issue can help me troubleshoot and resolve it.

    My agency uses three main plugins: Elementor, Elementor Pro, and Rank Math SEO. We use the same hosting provider, Cloudways, and have never had an issue with them. There is no custom code, other than small bits of custom CSS.

    I have been troubleshooting this issue with multiple customer service reps from my hosting provider and my own developer, and we can’t seem to get it resolved.

    The Problem:
    When I “Inspect Live URL” on my sitemap via Google Search Console, I’m getting a “No: ‘noindex’ detected in ‘X-Robots-Tag’ http header” error.

    This is affecting my core sitemap, causing it to not be indexed. This is also affecting the linked post, page, and category sitemaps, which all show a status of “Couldn’t Fetch.” This is extremely frustrating, as it is preventing my client’s business from being indexed and is not a good look for my agency.

    To save us both time, here is a list of the exhaustive troubleshooting I have already performed:

    Clearing Cache:

    Cleared the Elementor cache.

    Cleared the Rank Math SEO sitemap cache (by changing “Links Per Sitemap” from 200 to 199 and back).

    Cleared the Cloudways server cache.

    WordPress & Plugin Settings:

    Flushed WordPress “Permalinks.”

    Verified that the WordPress “Search engine visibility” checkbox (“Discourage search engines from indexing the site”) is not checked.

    Verified that Rank Math’s “Global Meta” > “Robots Meta” is set to “Index.”

    Verified that each individual page is set to “index” via the Rank Math Metabox.

    Conflicts & Submission:

    Verified I have no conflicting WordPress plugins (the only plugins active are Elementor, Elementor Pro, and Rank Math SEO).

    Submitted, deleted, and resubmitted my sitemap multiple times via Google Search Console.

    Verified that there are no conflicting “rules” within Rank Math’s robots.txt file. I also used the Google “Robots.txt Tester,” and everything came back with a status of 200 (good).

    External Checks:

    Used https://httpstatus.io to test the sitemap, and the status code came back as a “200” (OK).

    My hosting provider (Cloudways) has created a staging copy of my website to perform a deeper analysis. They confirmed that the noindex header is being applied only to the sitemap file and not to the rest of the website’s pages, suggesting it’s not a global server-side issue.

    The frustrating part is that I have built a previous website with the exact same three plugins and submitted the same exact sitemap to GSC without any problems whatsoever.

    I have been doing websites for the past two years, and this is the first time I have had to come across this issue. I am hopeful you can provide a solution as soon as possible. Thank you for your time.

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

    We apologize for the issue you are facing with the "noindex" detected in the "X-Robots-Tag" HTTP header error. Thank you for providing such detailed information about your troubleshooting efforts; it helps us understand the situation better.

    To address this issue, here are some steps you can take:

    1. Check for Noindex Tags: Ensure that the affected pages do not have a noindex tag in their HTML source. You can do this by inspecting the page source and looking for the following line:

      If you find it, you will need to remove it to allow indexing.

    2. Review X-Robots-Tag Header: Sometimes, server configurations or security plugins can add an X-Robots-Tag header that instructs search engines not to index the page. You can check this using tools like cURL or online HTTP header checkers. If you see X-Robots-Tag: noindex, you will need to adjust your server settings or plugin configurations.

    3. Check Plugin Conflicts: Since you are using multiple plugins, there might be a conflict causing this issue. Temporarily deactivate other plugins (except Rank Math) to see if the problem persists. If it resolves, reactivate them one by one to identify the culprit.

    4. Server Configuration: Since you are using Cloudways, ensure that there are no server-level rules or configurations that might be affecting the headers sent by your site. You may want to reach out to their support for assistance in checking this.

    5. Sitemap Accessibility: Make sure your sitemap is accessible without any restrictions. You can use tools like httpstatus.io to check if your sitemap returns a 200 status code.

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

    If you’ve gone through these steps and the issue persists, we recommend replying to this ticket with any additional findings or details, and a human agent from our support team will take over and assist you further.

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

    Sources:
    How to Fix Submitted URL Marked ‘NoIndex’ Error » Rank Math
    Troubleshooting the “Couldn’t Fetch” Error in Google Search Console » Rank Math
    How to Fix Indexing Issues in Google Search Console » 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.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hello,

    We have removed your website from your initial message as requested.

    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,

    I have an important update regarding the sitemap issue. I have been able to get the general sitemap, sitemap_index.xml, discovered by Google. The page-sitemap.xml is also working correctly, and Google has successfully discovered all 50 of my pages.

    However, the post-sitemap.xml and category-sitemap.xml files are still showing a “Couldn’t fetch” error as shown in the photos I have provided you.

    Could you please investigate why only these two specific sitemaps are failing to be fetched? The general sitemap and the pages sitemap are now working, which suggests the problem is with how these two specific sitemaps are being handled.

    Hello,

    We checked your post sitemap and category sitemap, and we can see they are working properly without any issues:

    In this case, please try to remove all the submitted sitemaps from your Google Search Console and resubmit /?sitemap=1 and see if that works for you.

    For more details, you can check this URL: https://rankmath.com/kb/couldnt-fetch-error-google-search-console/#rename-the-sitemap

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

    Thank you.

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

You must be logged in to reply to this ticket.