• Resolved surfdog9

    (@surfdog9)


    Currently search results pages have the following meta robots:

    <meta name=’robots’ content=’noindex, follow’ />

    I’d like to instead have

    <meta name=’robots’ content=’noindex, nofollow’ />

    Is there a way to do this with Yoast?

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Michael Ti?a

    (@mikes41720)

    Hi @surfdog9

    Internal search results are pretty much the last pages Google would want to send its visitors to. If you want to ruin a search experience, you link to other search pages, instead of an actual result.

    But the links on a search result page are still very valuable, you definitely want Google to follow them. So, all links should be followed, and the robots meta setting should be:

    <meta name=”robots” content=”noindex, follow”>

    Yoast SEO makes sure your internal search pages are set to noindex by default. It’s one of Yoast SEO’s hidden features. This is not an editable setting, because it’s simply how it should be done according to the Google Guidelines, and we fully agree with them on this.

    You can learn more about it here – https://yoast.com/which-pages-noindex-or-nofollow/

    We’re not sure as to why you would want to set the internal search results to ‘nofollow’ as well (as the links are relevant and could be useful), but if you want to make any changes, you may want to follow the code here. You can also refer to our developer portal for any other changes you want to make to the default output – https://developer.yoast.com/

    Thread Starter surfdog9

    (@surfdog9)

    Thanks for your help. This modification was a request from our SEO team. I was able to modify with the following:

    add_filter( 'wpseo_robots', 'yoast_seo_robots_modify_search' );
    
    function yoast_seo_robots_modify_search( $robots ) {
      if ( is_search() ) {
        return "noindex, nofollow";
      } else {
        return $robots;
      }
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How do I add “noindex, nofollow” to all search results pages’ is closed to new replies.