public static function isDomainname($value)
    {
        if (strlen($value) > 253) {
            return false;
        }

        $pattern = "/^(?!\-)(?:[a-zA-Z\d\-]{0,62}[a-zA-Z\d]\.){1,126}(?!\d+)[a-zA-Z\d]{1,63}$/";

        return (boolean) preg_match($pattern, $value);
    }