Get Sub-domain from an url

Hi to all,
i want to read Url from web Browser (Vaadin 7)
my Server support sub domain , Url format :
example : ,

i use the method Page.getCurrent().getLocation() to read Url from Web browser but the returned value is ==> i dont know why server return Ip adreess instead the domain Name

i want a way to read the value of sub domain entered in the Url

example : Url browser => result =private