def METHOD_NAME(self):
    site = self.get_site()
    if site is None:
        return ""
    ssl_enabled = True
    if site.domain.startswith("localhost:"):
        ssl_enabled = False
    url = "http{ssl_flag}://{domain}".format(
        ssl_flag="s" if ssl_enabled else "",
        domain=site.domain,
    )
    return url