The task is relevant if hosting subdomains refer to the root of the main site, or if several domains are registered as aliases to each other.
If you need to write noindex/nofollow etc., you can simply write a condition in index/header section:
<?php $host = $_SERVER['HTTP_HOST']; if($host == "old.domain.com" or $host == "www.old.domain.com") { echo 'meta name="robots" content="noindex, nofollow"'; } ?>
Instead of old.domain.com and meta name=”robots” content=”noindex, nofollow” use your actual values.