property Message.CanonicalName as String
Retrieves a value that specifies the canonical or primary name for the host.

TypeDescription
String A string expression that specifies the canonical or primary name for the host.

The CanonicalName property retrieves a domain name which specifies the canonical or primary name for the host. If the DNS response contains multiple values, the Separator property determines the delimiter for the list of values.

The following sample displays the alias for the host:

Dim n As New LookupNS
MsgBox n.Query("www.microsoft.com").CanonicalName