Search code examples
wordpressamazon-web-serviceshttpheadernoindex

How to remove noindex from HTTP response header


Want to remove noindex tag from the HTTP header:

I'm using instance on AWS. The web server is open lightspeed + WordPress.

I want to submit my site map to Google site all of my pages and post can be crawled by Googlebot but the site map issued by Yoast plugin is not indexing by Google. Google says "remove the noindex HTTP header"

My site's sitemap is: https://flaremovies.tk/sitemap_index.xml


Solution

  • You don't want the XML sitemap itself to be indexed. Having a noindex header on the sitemap is the recommended way from having the XML document appear in Google search results. See Prevent XML sitemaps from showing up in Google search results - Webmasters Stack Exchange

    When a sitemap gets indexed, it looks really ugly:

    What you really want is the pages listed in the sitemap to get indexed. The noindex header on the sitemap won't prevent that. Instead of inspecting the sitemap URL itself in Google Search Console, inspect any of the URLs that are listed in the sitemap and verify that they are allowed to be indexed.