### Function

# Malcontent WebFilter validate_domain_name_len

since: 0.14.0

#### Declaration [src]

    gboolean
    mct_web_filter_validate_domain_name_len (
      const char* domain_name,
      size_t max_len
    )

#### Description [src]

Validate a potential domain name.

This checks against RFC 2181.

See `mct_web_filter_validate_hostname_len()` for validating hostnames instead. Domain names are entries in the DNS database, hostnames are website addresses. Every hostname is a domain name, but not vice-versa.

Available since: 0.14.0

#### Parameters

`domain_name`

  Type: `const char*`

  A potential domain_name.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

`max_len`

  Type: `size_t`

  Length (in bytes) to check, or until the first nul byte is reached.

#### Return value

Type: `gboolean`

True if `domain_name` is a valid domain_name, false otherwise.