Reputation: 163
I running three azure web apps for developing stages. Dev, Demo and Prod. These are called ex. mydomian.azurewebsites.net
Then I have the main domain as www. mydomian.net
Now Dev, Demo and Prod beginning to appear on Google Search results, and I want that to be disabled. But not for the main domain www. mydomian.net
Is there any good solutions to that problem?
Upvotes: 0
Views: 319
Reputation: 6425
If you do separate deploys for each instance you can manually manage a robot.txt file, but if (like me) when 'Demo' passes UAT you just swap it into the live site that won't work.
One solution, which is very easy if you are using some kind of Master Page, is to use 'sticky' AppSettings slots to determine when to insert the robots.txt into the instances html pages. You could also look at the url, but as this can change I prefer to go with sticky slots (tickable in the 'new' Azure portal)
Upvotes: 1