Prevent Search Bots from Indexing Search Results

Avatar of Chris Coyier
Chris Coyier on

In the <head> section of your header.php file:

<?php if(is_search()) { ?>
   <meta name="robots" content="noindex, nofollow" /> 
<?php }?>