Change tag to no index to index

#1065665
  • Resolved R3ndy
    Rank Math free

    I intentionally left my posts and pages unindexed. I want to manually index them. My question is, how do I change the noindex tag to index (sitemap_index.xml) specific code?

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

    We apologize for the issue you are facing. To change the noindex tag to index for your posts and pages, you can follow these steps:

    1. Check Titles & Meta Settings: Go to Rank Math SEO → Titles & Meta in your WordPress dashboard. Ensure that the settings for your posts and pages are set to index as per your preference. If they are set to noindex, change them to index and click Save Changes.
      Set Noindex in Titles and Meta Settings

    2. Use Bulk Actions: If you want to change multiple posts at once, go to the Posts menu in WordPress. Use the Rank Math filter to select Articles Noindexed, then select the posts you want to change, choose Set to Index from the Bulk Actions dropdown, and click Apply.
      Set to Index

    3. Search Engine Visibility: Ensure that your site is not set to discourage search engines from indexing it. Go to Settings → Reading and make sure the checkbox for Discourage search engines from indexing this site is unchecked.
      Leave Search engine visibility unchecked

    After making these changes, your sitemap should reflect the updated index status.

    Unfortunately, there is no code that can directly change the noindex tag in the sitemap_index.xml file; it is managed through the settings in your WordPress dashboard.

    If you need further assistance or a more comprehensive setup, we recommend our professional setup service available at Rank Math Services. This service requires a PRO subscription and ensures your plugin setup adheres to the latest SEO standards.

    Thank you for raising this concern! If you have any more questions or need further clarification, feel free to reply to this ticket.

    Sources:
    Fix Excluded by NoIndex Tag – Google Search Console Status » Rank Math
    Fix Excluded by NoIndex Tag – Google Search Console Status » 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 ( '/page-sitemap.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.

    R3ndy
    Rank Math free

    Thank you for the code you provided, the code works fine.

    Hello,

    Glad that helped.

    Please feel free to reach out to us again in case you need any other assistance.

    We are here to help.

    Thank you.

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

You must be logged in to reply to this ticket.