I think changing the address tool is what you need. Take a look at this https://support.google.com/webmasters/answer/83106?hl=en
You can also return a dynamic domain-based robots.txt file:
example.azurewebsites.net/robots.txt:
User-agent: * Disallow: /
www.example.com/robots.txt:
User-agent: * Allow: /
Example here
But changing the address tool is probably better.
source share