I have several sites where old domains need to be redirected to new domains. So I have added them as addon domains and created redirects to the main domain, with wildcards, which work fine. However, I have noticed that Google is still seeing and indexing the old domains, with the content on the main domain, despite the redirects, so they are effectively duplicate websites. If I do a google site search for olddomain.com, all the pages from newdomain.com will appear on olddomain.com in the results with the current content (I know that by checking the cached version). Can anyone tell me why this is happening and any way to stop it? I've tried addingto the htaccess file in the addon domain's folder but I don't think it has any effect when there is a 301 in place, does it?
Header set X-Robots-Tag "noindex, nofollow"