Code Snippets → WordPress → Prevent Search Bots from Indexing Search Results Prevent Search Bots from Indexing Search Results Chris Coyier on Aug 6, 2009 In the <head> section of your header.php file: <?php if(is_search()) { ?> <meta name="robots" content="noindex, nofollow" /> <?php }?>
This piece of code seems to be very useful. I never thought about this before, but yes, I definitely don’t want my search results page to be followed by robots.