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
- 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:
max-image-preview:largepart is found in
wp_robots_max_image_preview_large()function (the only instance accross entire WordPress blog network / fileset).
noindexstring is found in:
- A number of files in
- Four files of the Jetpack plugin
- Six files in the
wp-includes\robots-template.phpfile again, in the
Both mentioned onezeronull.com 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:
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)?
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:
While I have no recorder update to neither core WordPress nor any plugin or theme at that specific point of time.
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.