I want to disable ‘users’ indexing by google bot. So, I simply put the following lines in the header area.
<?php if ( is_search() || is_author() ) : ?>
<meta name="robots" content="noindex, nofollow" />
<?php endif ?>
Does it prevent google bot from being indexed users, and showing users in its SERP?
Does this method have any side-effects? Are there any techniques to optimize google indexing?
Thanks in advance.
If you want to prevent google bots only from ‘users’ page, then it just should be like this:
In your code, there is also
is_searchfunction which checks search results page is displayed or not.And of course, it does not have any side-effects 🙂