Noindex,follow always added to head

Whenever I install Bedrock, WordPress always adds <meta name="robots" content="noindex,follow"/> to the head.

I did some testing and the the function get_option( 'blog_public' ) always returns 0, even when the value in the database is 1. The strange thing is, the checkbox for “Discourage search engines from indexing this site” displays the correct value (1 for unchecked en 0 for checked).

When I install WordPress without Bedrock, by just downloading the zip from the WordPress site, this is not happening.

I use a default theme, no plugins and no robots.txt.

1 Like

this is because of Disallow indexing plugin. It’s a must use plugin that get’s installed when you install bedrock. If you change the the environment in .env to production the tag won’t be added to the head.

6 Likes

Thanks for the explanation!

Just a note that if you’re using your WP_ENV properly, this plugin won’t apply in production :smile:

1 Like