were experiencing a strange issue with a wordpress sites meta robots tag. All pages have the following meta tag and we cant seem to remove it
<meta name="robots" content="noindex,follow"/>
We have unchecked “Discourage search engines from indexing this site” in Settings > Reading > Search Engine Visibility but it does nothing.
We are using the Yoast SEO plugin but even when this is disabled the still remains. In fact, we have tried disabling all plugins to check nothing was interfering with it.
We have setup our Robots.txt file as follows:
User-agent: *
Disallow:
Sitemap: http://speysidedistillery.co.uk/sitemap.xml
Im not sure if the Robots.txt takes precedent over the robots meta tag or not and there doesn’t seem to be a definitive answer, as far as i can gather the most restrictive one will take precedent i.e in our case the meta tag.
This is mainly giving us issues with our google listing with the warning “A description for this result is not available because of this site’s robots.txt” appearing instead of our sites description.
If worse comes to worst we can edit the wp_no_robots function in wp-includes/general-templates.php but would prefer to resolve this without editing the wp core files.
Any light anyone could shone on this would be great as we are at a loss, cheers
The site can be found at http://speysidedistillery.co.uk/
i Developed an E commerce site for a client and i was stacked with this issue for more than a week, all pages were indexed except for the Home Page.
After a long debugging of Yoast Seo Plugin, i got a solution for you guys.
SOLUTION
The Homepage has a search page on it (for searching for products). By default, Yoast disables ‘index’ meta tag for Search Page and 404 Page. funny enough if your homepage has a search page or search functionality on it, your site may not be indexed by google or any other search engine.
To fix this default by Yoast SEO Plugin, follow the following steps:
STEP 1:
Log into your cpanel and navigate to
/public_html/yourwebsite.com/wp-content/themes/nameOfTheTheme/functions.php
add this line of code to your theme’s function.php file (at the top of the page)
After pasting the code, save and close file.
STEP 2
Note this second step is for those that are using any of the following SEO plugins (Yoast Premium, Yoast Free or wordpress-seo-premium plugin)
Navigate to: /public_html/youwebsite.com/wp-content/plugins/wordpress-seo-premium/frontend/class-frontend.php
replace the code at line 713 with this one below here:
Save file and close
Congratulations! you just made it.
It working perfectly guys!
If you are using Roots Bedrock, then check the value of
WP_ENV
in your.env
file. If it is set todevelopment
then this automatically overrides the value ofblog_public
to always befalse
, meaning the “no robots meta” is always injected.Simply change it to
WP_ENV='production'
in your.env
file, save the changes and it will be fine.I found a solution that worked for me here
This question appears to be on three threads:
Navigate to Yoast SEO -> Search Appearance. Choose tab
Content Type
orTaxonomies
depending on the page you need indexed by google.In my case, google can not index my tags page (/tag/tag-name)), So i switched
Show Tags in search result?
toYes
. It will change robots meta tag from:to
Hope can help.
i looked into many solutions but was not able to update it, even updated the functions.php file by adding the below code snippet. You need to update the “class-frontend.php” but, I couldn’t find that. Then I tried this and it worked for me.
go to appearance -> theme editor -> header.php
You can try this
Options->Privacy->Blog visibility. You have it set to block search engines.
Check your
header.php
file inside the theme folder.I deleted yoast and reinstalled. While re installing it asks if to index, I choose yes this time. It worked. But luckily , for me I had not made much seo ,may be 1 or 2 pages the first time.
How to Remove WordPress Robots Meta Tag noindex, nofollow
We will show you how to remove meta name=ârobotsâ content=ânoindex nofollowâ in WordPress using replace some code inside the admin panel, no plugin request.
Step 1 â Log into your cPanel
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 and type general-template.php.
Step 2 â Edit general-template.php File
Find this code inside general-template.php
}
Replace first with this code:
}
2 â Find this second code same file general-template.php:
This
}
Replace to
}
Once that is complete, go back to the website check, change into Search Console, resubmit the URL you tried earlier. The URL inspection report should be void of all warnings and error messages, at least ones related to indexing and crawl ability, and youâll be able to âRequest Indexing,â.
I found a solution that worked 100% Read Full Details here
Make Sure “Discourage search engines from indexing this site” checkbox is not checked under Settings-> Reading. if it is then mark it unchecked.
Lastly, This is the step that creating problem for me is inside Yoast SEO Plugin.
Go to YOAST SEO-> Search appearance ->Content Types->Pages under these settings. Make sure Following Settings are on:
Clear your wordpress and browser cache. This steps helps in removing noindex from meta tag.