Exclude domain in robots.txt Is it possible to exclude a domain name in robots.txt?

I have a single Drupal site with multiple domains pointing on it. For example our dev and staging server are being crawled by Google when our .htaccess password protection is disabled.

I don't intent to block any access in our development server but to tell search engine bots to stop indexing all the contents when the domain is/are dev or staging. 

Basically I am seeing some of the links pointing in dev servers when I search some of my content in Google.

Is there any way or any module that could handle this?

EDIT:

Here's how I ended. Inside theme_preprocess_html().

// Avoid search engines to index dev and stage domains.
  $restricted_domains = array('dev.mydomain.com', 'stage.mydomain.com', 'editorial.mydomain.com'); 
  if (in_array($_SERVER['HTTP_HOST'], $restricted_domains)) {
    $meta_robot = array(
      '#tag' =&gt; 'meta',
      '#attributes' =&gt; array(
        'name' =&gt; 'robots',
        'content' =&gt; 'noindex, nofollow'
      ),
    );
    drupal_add_html_head($meta_robot);
  }
Robots.txt will not help your site being crawled (technically) by anything. They're just guidelines which Bots should follow. You should limit dev and test server access by Firewall rules, or as you've mentioned by httpauth.