Bit of a strange one. One of my clients site is showing <meta name='robots' content='noindex,follow' /> in the head. The Search Engine Visibility checkbox is unchecked.

I've tried activating 2019 theme and deactivating all plugins and still the tag shows.

Never encountered this before. Any ideas?


2 Answers 2


Check to make sure the blog_public option in the options table is set to 1. If that looks right, make sure nothing is adding that tag via the wp_head action. Also make sure this isn't being set by any plugins. This is common for SEO plugins.

  • I checked blog_public in the options table already. I also activated default 2019 theme and disabled all plugins and it still doesn't get rid of the noindex tag.
    – Luke Seall
    Commented Apr 10, 2019 at 19:08
  • If that's the case, something else is going on. Does your host have any mu plugins or wp-config.php changes? Commented Apr 10, 2019 at 23:12

To switch from noindex to index from inside a template:

        global $wp_filter;
        foreach($wp_filter['wpseo_robots_array']->callbacks[10] as $k => $v){
            $robots = $v['function'];
        remove_filter( 'wpseo_robots_array', $robots );

see: https://github.com/Yoast/wordpress-seo/blob/f6719d2e5d6eb173ab6a9ca63093b422582d66be/src/integrations/front-end/indexing-controls.php#L53

Or, much easier:

update_option('blog_public', 1);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.