Sitemap “noindex” Issue Persists Despite Following All Recommended Steps

#1006102
  • Resolved SOUNDS GOOD
    Rank Math free

    Subject: Sitemap “noindex” Issue Persists Despite Following All Recommended Steps

    Dear Rank Math Support Team,

    I’m still facing the noindex issue in the X-Robots-Tag header for my sitemap (https://fashionfrenzee.com/sitemap_index.xml) even after carefully following all your instructions. Here’s what I’ve done so far:

    Verified Sitemap Settings:

    Confirmed that Rank Math’s sitemap settings (Rank Math SEO → Sitemap Settings) are properly configured.

    Disabled Caching:

    Excluded the sitemap from all caching plugins (e.g., WP Rocket, LiteSpeed Cache).

    Cleared all caches (server, CDN, and browser).

    Added the Filter Hook:

    Inserted add_filter( ‘rank_math/sitemap/enable_caching’, ‘__return_false’ ); into my theme’s functions.php (and tested via the Code Snippets plugin).

    Result: The noindex tag still appears in the header.

    Additional Debugging Steps I Took:
    Tested with all plugins disabled except Rank Math → issue persists.

    Switched to a default theme (e.g., Twenty Twenty-Four) → no change.

    Checked server headers (.htaccess/Cloudflare) → no conflicting rules.

    Request:
    Since the issue seems tied to Rank Math’s sitemap system, could you:

    Confirm if this is a known bug?

    Provide an alternative solution (e.g., a different filter or patch)?

    Thank you for your time—I’d appreciate any further guidance!

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

    We apologize for the issue you are facing with the noindex tag in the X-Robots-Tag header for your sitemap. Thank you for providing detailed information about the steps you’ve already taken; it helps us understand your situation better.

    Since you’ve already verified your sitemap settings, disabled caching, and added the filter to your theme’s functions.php file, here are a few additional suggestions:

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

    2. Custom Canonicals: If you have set custom canonical URLs for your posts, this could affect how they appear in the sitemap. Make sure to remove any custom canonicals if you want all posts to be included in the sitemap.

    3. Server Configuration: Since you mentioned checking server headers, ensure that there are no server-level configurations (like .htaccess or Cloudflare settings) that might be adding the noindex tag.

    4. Debugging with Health Check Plugin: If you haven’t already, consider using the Health Check plugin to check for any plugin conflicts that might not be apparent when disabling plugins manually.

    5. Alternative Filter: While the filter you added is typically effective, you might also try adding the following filter to see if it resolves the issue:

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

    If none of these steps resolve the issue, it may be beneficial to reply to this ticket with any additional findings or changes you’ve made. A human agent from our support team will then take over and provide further assistance.

    Thank you for your patience, and we look forward to helping you resolve this issue!

    Sources:
    Rank Math Sitemap Issues and Their Fixes » 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 “noindex” Issue Persists Despite Following All Recommended Steps’ is closed to new replies.