Addind a meta noindex tag within template.php
You could use the following code.

function mytheme_preprocess_node(&amp;$variables, $hook) {
  $node = $variables['node'] ;
  if ($node-&gt;nid == '123') {
    $element = array(
      '#tag' =&gt; 'meta', 
      '#attributes' =&gt; array(
        'name' =&gt; 'robots', 
        'content' =&gt; 'noindex',
      ),
    );
    drupal_add_html_head($element, 'mytheme_noindex');
  }
}


In Drupal 6, you just use drupal_set_html_head('&lt;meta name="robots" content="noindex" /&gt;'), instead of drupal_add_html_head().

I would rather use the code in a module, as a theme should not know details such as the existence of a node with a specific ID. Plus, if the site has more than one theme enabled, or it is possible that a different theme is enabled in future, the code should be copied in each enabled themes, while a module will always be executed, independently from the theme being used.