def always_https(url):
    """ ensures that urls are always using HTTPS

    :param url: An URL (as string)
    :type url: str

    :return: The passed in URL with HTTPS
    :rtrype: str

    """

    if not url.startswith('http'):
        return url
    elif url.startswith('https'):
        return url
    else:
        https_url = url.replace('http://', 'https://')
        return https_url