use hostname instead of host in case a port is included