Malcontent.WebFilter.validate_hostname
Description: Reference for Malcontent.WebFilter.validate_hostname

### Function

# Malcontent WebFiltervalidate_hostname

since: 0.14.0

#### Declaration [src]

    gboolean
    mct_web_filter_validate_hostname (
      const char* hostname
    )

#### Description [src]

Validate a potential hostname.

This checks against RFC 1035.

See `mct_web_filter_validate_domain_name()` for validating domain names 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

`hostname`

  Type: `const char*`

  A potential hostname.

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

#### Return value

Type: `gboolean`

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