If a website is available on two different domains, ex: domain1.com and domain2.com and the content of domain2.com differs slightly from that of domain1.com, how can I instruct Google to complete ignore domain2.com?
Via robots.txt?
Also, will domain1.com be affected in a negative way?
I ask because some pages of my website should not be visible to certain type of users and since there is no login/registration to differentiate users, I was thinking of having the same website on two different domains and using the domain to understand what to show and hide.