When I try to get the http://subdomain.domain.com domain's host, the result is always "127.0.0.1". I tried several variations, for example
rootUrl = string.Format("{0}://{1}{2}{3}",
context.Request.Url.Scheme,
context.Request.Url.Host,
context.Request.Url.Port == 80 ? ""
: ":" + context.Request.Url.Port,
context.Request.ApplicationPath);
I also tried other suggestions from this SO page, but the result remains IsLocal=true, Port=80 and Host="127.0.0.1". Why do I not get "subdomain.domain.com" for Host or Request.Url.Authority when on the live web page?
EDIT The same thing happens when accessing the site from different, totally unrelated machines.