    def host(self):
        """Get the *host* for my server (proto://domain[:port])"""
        # if subdomains are used, use our domain

        if self.settings.get('subdomain_host'):
            parsed = urlparse(self.settings['subdomain_host'])
            h = f"{parsed.scheme}://{self.domain}"
            if parsed.port:
                h = f"{h}:{parsed.port}"
            return h
        elif self.settings.get("public_url"):
            # no subdomain, use public host url without path
            return urlunparse(self.settings["public_url"]._replace(path=""))
        else:
            return ""
Get the *host* for my server (proto://domain[:port])
jupyterhub/user.py