Noindex, nofollow stuck on homepage

Recently my hosting automatically upgraded our WordPress version. Due to custom plugin conflicts, we requested them to restore it to the previous version.

Our homepage now contains the code “meta name=”robots” content=”noindex,nofollow”https://wordpress.stackexchange.com/” (< removed). From Googling, it appears that this code should be added when I visit the Privacy section of WordPress and select “I would like to block search engines, but allow normal visitors”.

However, my site is selected as “I would like my site to be visible to everyone, including search engines (like Google, Bing, Technorati) and archivers”.

I also understand that by default, WordPress chooses the first option, blocking search engines. I think that at some point during the restore to a previous version, WordPress has got stuck in the blocking search engine mode. Changing privacy is having no affect on the code.

I need a manual way to remove “meta name=”robots” content=”noindex,nofollow”https://wordpress.stackexchange.com/” from the homepage – I have no idea where the code is located though.

1 Answer
1

The setting is stored in the options table under the key blog_public, the value is either 0 or 1. You can see the value of all options by manually visiting the page /wp-admin/options.php.

A quick way to get rid of it would be to remove the noindex action hooked to wp_head, which is what outputs that tag if blog_public is 0:

remove_action( 'wp_head', 'noindex', 1 );

This behavior is a bit strange though, I suspect perhaps something else may be involved here beyond simply the value of this option.

Leave a Comment