View Single Post
  #1  
Old August 17th, 2011, 04:13 PM
blnklaus blnklaus is offline
 
Join Date: Jun 2011
Posts: 70
Default prevent google from indexing some sites

Hi guys,

for my wordpress site i use this code to prevent google from indexing the following sites for the front page and the category pages. This code makes, that only the first page of the home page and the categories will be indexed. The following pages becomes a noindex, follow in the robot meta tag. Is it possible to do the same for the store front page and the category page?

HTML Code:
<?php if(is_home() && ($paged) || is_single()&& ($paged) || is_page()&& ($paged) || is_category()&& ($paged)){
echo '<meta name="robots" content="noindex,follow" />';
}?>
thanks Klaus from Berlin