I\'ve done some research and run up with this code
remove_action(\'wp_head\',\'noindex\',1);
but apparently it\'s not removing the
I will show you how to remove meta name='robots' content='noindex nofollow' in WordPress using replace some code inside the admin panel.
Step 1 - public_html → wp-includes → general-template.php
Well, you log inside the public_html directory, now you find a folder, name wp-includes, double click to open this folder. At the same time, there are so many folders and files, take a breath and simply click to your keyboard Ctrl+f find file and type general-template.php.
Step 2 - Edit Two function
- First Code function Find:
function wp_no_robots() {
if ( get_option( 'blog_public' ) ) {
echo "<meta name='robots' content='noindex,follow' />\n";
return;
}
echo "<meta name='robots' content='noindex,nofollow' />\n";
}
- First Code replace with bellow
function wp_no_robots() {
if ( get_option( 'blog_public' ) ) {
echo "<meta name='robots' content='index,follow' />\n";
return;
}
echo "<meta name='robots' content='index,follow' />\n";
}
- Second Code function Find:
function wp_sensitive_page_meta() {
?>
<meta name='robots' content='noindex,noarchive' />
<meta name='referrer' content='strict-origin-when-cross-origin' />
<?php
}
- Second Code replaces with bellow:
function wp_sensitive_page_meta() {
?>
<meta name='robots' content='index,archive' />
<meta name='referrer' content='strict-origin-when-cross-origin' />
<?php
}
I hope that helps, For full Details Click this link:
Log in to your WordPress website.
When you're logged in, you will be in your 'Dashboard'.
Click on 'Settings'. On the left-hand side, you will see a menu. ...
Click on 'Reading'. ...
UnCheck 'Discourage search engines from indexing this site'.
Click 'Save Changes'.