I have created a two sites like this:
<Sites>
<Site name="WebRole" physicalDirectory="./WebRole">
<Bindings>
<Binding name="Endpoint1" endpointName="HttpEndpoint" />
</Bindings>
</Site>
<Site name="MySite" physicalDirectory="./MySite">
<Bindings>
<Binding name="Endpoint" endpointName="HttpEndpoint" hostHeader="www.MySite.com"/>
</Bindings>
</Site>
</Sites>
I have changed my DNS under CNAME (Alias) -> www to xxx.cloudapp.net
Therefore when I type in www.MySite.com it gets to my cloud app, the hostHeader is recognized and goes to the right physical site. The HostHeader works fine.
Now I try to do the same thing as a subdomain.
<Site name="MySite" physicalDirectory="./MySite">
<Bindings>
<Binding name="Endpoint" endpointName="HttpEndpoint" hostHeader="sub.MySite.com"/>
</Bindings>
</Site>
In DNS manager I didn't try to do it in CNAME but instead I did a masked Forward of the sub domain to the same side's address xxx.cloudapp.net.
But this doesn't work. It simply open up the first Site instead. It seems the HostHeader is not understood in order to point to the second physical path.
What am I missing?