noindex – What is responsible for triggering “robots-template.php” file or “wp_robots_noindex()” core function out of it?


tl;dr: What event, scenario or situation can:

  • Trigger execution of the core wp_robots_noindex() function (from the wp-includes\robots-template.php file) or
  • Cause adding <meta name="robots" content="noindex" /> to every page’s source code

if the corresponding Discourage search engines from indexing this site configuration option is disabled and any corresponding configuration switch from both any plugin or theme are also disabled?


Nearly two months ago (at exactly Wed, 6 Nov, 09:07 CET+2) Google Search Console issued me a warning email that my most visited blog page cannot be searched because it includes noindex meta tag. As an example, following URL was given:

I have visited the above page and in the WordPress-generated response I have indeed found the following HTML code:

<meta name="robots" content="noindex, follow, max-image-preview:large" />


I have searched:

  • All the core WordPress files
  • All my active plugins
  • All my themes

and found nothing. Then I have searched for just parts of this string and found the following:

  1. The max-image-preview:large part is found in wp-includes\robots-template.php in wp_robots_max_image_preview_large() function (the only instance accross entire WordPress blog network / fileset).

  2. The noindex string is found in:

  • A number of files in wp-admin folder
  • Four files of the Jetpack plugin
  • Six files in the wp-includes folder, including wp-includes\robots-template.php file again, in the wp_robots_noindex() function.

Both mentioned page and any other page in my entire blog network has the Discourage search engines from indexing this site disabled in the Reading Settings section:

enter image description here


If the above option is disabled then what else can cause adding noindex part to my every page’s source code (provided that it is not caused by any plugin, theme or configuration option)?

Which core code is responsible for triggering wp_robots_noindex() function from the wp-includes\robots-template.php file and how can I block this situation (or prevent adding noindex by any other meaning)?

Side problem

BTW: I have intentionally given the Wed, 6 Nov, 09:07 CET+2 date because another “mystery” here for me is why the whole situation started at exactly then:

enter image description here

While I have no recorder update to neither core WordPress nor any plugin or theme at that specific point of time.

Own research

I have searched this site and found these two similar questions-answers:

But found not solutions since these two deals with blocking web crawlers using either robots.txt file or X-Robots-Tag: none tag. So nothing around <meta name="robots" content="noindex" /> meta tag.

I have searched a number of Internet sources for this problem as well, but also found no clue.

trejder 1 month 2022-12-25T11:33:05-05:00 0 Answers 0 views 0

Leave an answer