Sitemap returning X-Robots-Tag: noindex header

#1085664
  • Resolved Kk T
    Rank Math free

    Hello,

    On my website (https://easytool.co.kr/), the sitemap responses (e.g. /sitemap_index.xml) include the following HTTP header:

    X-Robots-Tag: noindex

    Because of this, Google Search Console reports the error:
    “Submitted URL marked ‘noindex’.”

    I am using the latest version of Rank Math SEO.
    Could you please confirm if this header is intentionally added by Rank Math, and if so, provide the official way to disable or remove it?

    Thank you for your assistance.

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

    We apologize for the issue you are facing with your sitemap returning the X-Robots-Tag: noindex header. This can indeed cause problems with Google Search Console reporting errors for submitted URLs.

    The X-Robots-Tag: noindex header is not intentionally added by Rank Math for sitemaps. It usually indicates that there might be a configuration issue or a conflict with another plugin or server settings.

    To resolve this issue, you can try the following steps:

    1. Check Your Robots.txt File: Ensure that there are no rules in your robots.txt file that might be blocking the sitemap. You can check this in the Rank Math settings under Rank Math SEO → General Settings → robots.txt.

    2. Disable Caching for Sitemaps: If you are using a caching plugin, make sure to exclude your sitemap from being cached. You can refer to our tutorial on how to exclude sitemaps from caching.

    3. Check for Plugin Conflicts: Sometimes, other plugins may interfere with the headers sent by Rank Math. You can use the Health Check plugin to identify any conflicts.

    4. Server Configuration: If the above steps do not resolve the issue, it may be necessary to check your server configuration or contact your hosting provider to ensure that there are no server-level rules adding the noindex header.

    If you continue to experience issues after trying these steps, please reply to this ticket with any additional details, and a human agent from our support team will assist you further. Thank you for raising this concern!

    Sources:
    Rank Math Sitemap Issues and Their Fixes » Rank Math

    Hello,

    Please note that the sitemaps are by default set to Noindex as they are meant to be crawled and not to be displayed on search results pages. Even though it is set to Noindex, Google can crawl and read this without any issues.

    You should only submit your sitemap to the sitemap section of your GSC account and shouldn’t use the URL inspection tool for the sitemap URLs.
    https://rankmath.com/kb/submit-sitemap-to-google/

    In case you still want to index your sitemap, 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.

    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 returning X-Robots-Tag: noindex header’ is closed to new replies.