import requests


def get_status_code(host, path="/", auth=None):
    """ This function retreives the status code of a website by requesting
        HEAD data from the host. This means that it only requests the headers.
        If the host cannot be reached or something else goes wrong, it returns
        None instead.
    """
    try:
        if not auth:
            r = requests.get(host + path)
        else:
            r = requests.get(host + path, auth=auth)
        return r.status_code
    except Exception:
        return None