Answer the question
In order to leave comments, you need to log in
How to remove links to .php and .js files from Google results?
Site on Wordpress. .php and .js files got into Google's additional issue
Until January of this year, robots.txt and the meta tag were configured haphazardly. In January, I set up the site according to the article Alaich 'a:
It is written in robots.txt:
User-agent: *
Allow: /wp-content/uploads
Disallow: /wp-
Host: site.com
Sitemap: http://site.com.xml
/* Robots */
function meta_robots () {
if (get_query_var('cpage') or is_archive() or is_category() or is_feed () or is_author() or is_date() or is_day() or is_month() or is_year() or is_tag() or is_tax() or is_attachment() or is_paged() or is_search())
{
echo "".'<meta name="robots" content="noindex,nofollow" />'."\n";}
}
add_action('wp_head', 'meta_robots');
/*--------------------------------------*/
Answer the question
In order to leave comments, you need to log in
Well, except to password-protect directories, but why?
https://support.google.com/webmasters/answer/93708
Perhaps the robot has not had time to scan everything yet.
https://support.google.com/webmasters/answer/93710
Alternatively, in the webmaster panel, try to view as Googlebot the pages that need to be kicked out of the index. Then the robot will see the meta tag and, perhaps, follow the recommendations faster.
https://support.google.com/webmasters/answer/6066467
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question