import socket


def is_hostname_valid(host: str) -> bool:
    """
    Test if a given hostname can be resolved.
    """
    try:
        socket.gethostbyname(host)
        return True
    except socket.gaierror:
        return False

    return False