title: Getting mapped custom domain url in Azure
body: <p>My azure web application (myapp.azurewebsites.net) is mapped to a custom domain (client1.mycompany.com).</p>
  
  <p>I will be mapping it to some more custom domains (client2.mycompany.com, client3.mycompany.com etc.) one per each client. </p>
  
  <p>In web application I am using </p>
  
  <pre><code>HttpContext.Current.Request.Url.Host 
  </code></pre>
  
  <p>to get custom domain address which is accessing the application. But it is sometimes returning myapp.azurewebsites.net instead of custom domain.</p>
  
  <p>Any idea how I can custom domain url in Azure in reliable way?</p>