def check_zones(domain, zones):
    """
    Check if the provided domain exists within the zone
    """
    for zone in zones:
        if domain == zone or domain.endswith("." + zone):
            return zone
    return None