def build_base_url(host, port, protocol):
    """
    Build the base URL for the given parameters and do not explicitly put the
    standard HTTP(s) ports into the URL.
    """

    base_url = "%s://%s" % (protocol, host)
    if protocol.lower() == "http" and int(port) != 80:
        base_url += ":%d" % int(port)
    elif protocol.lower() == "https" and int(port) != 443:
        base_url += ":%d" % int(port)
    base_url += "/"
    return base_url