Name

host — query a proxy/content DNS server using the DNS protocol

Synopsis

host [-4] [-6] [-r] [-a] [-t t] {n} [s]

Description

host looks up resource records for n. It prints the results in the same human-readable format as employed by dnsq(1) and dnsqr(1).

If s is supplied it makes a Domain Name System request to a server at s, otherwise it makes a Domain Name System request to the configured local proxy DNS server(s). See djbdns-client(5) for how this server is found, for name qualification, and for certain standard domain names that short-circuit DNS lookups to the proxy DNS server(s).

If t is supplied, that is the type of resource record that it looks up. t can be numeric or symbolic, just as for dnsq(1) and dnsqr(1).

Caution

host is a diagnostic tool, and thus permits using improper values of t.

Note

host -t axfr , host -t any , and host -t opt simulate things that valid DNS clients will not actually do. See RFC 8482 for the particular case of any passing into desuetude, and RFC 6891 for why opt is never a valid client query type.

The -a option is equivalent to -t any . Note that "any" is not "all", and this is generally not useful (even before RFC8482).

  1. If the -6 option is not used and n is a human-readable IPv4 address, host defaults t to ptr if it is not supplied and looks up the a.b.c.d.in-addr.arpa. reverse-lookup domain corresponding to that IPv4 address.

  2. If the -4 option is not used and n is a human-readable IPv6 address, host defaults t to ptr if it is not supplied and looks up the a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.ip6.arpa. reverse-lookup domain corresponding to that IPv6 address.

  3. If the -6 option is not used host feeds n through name qualification and defaults t to a if it is not supplied.

  4. If the -4 option is not used host feeds n through name qualification and defaults t to aaaa if it is not supplied.

The -6 and -4 options are mutually exclusive.

The -r option causes the lookup to use a non-recursive query. Note that this usually will not work if s is not supplied and host is thus defaulting to the configured local proxy DNS server(s), or s denotes proxy DNS servers.

host has no "debug" mode, and its output is already verbose. It does not support non-Internet class queries, performing zone transfers (for which axfr-get(1) is the proper tool), or variations from the normal UDP/TCP timeout and fallback mechanisms. It only employs one query type for any given invocation.

See also

dnsqr(1)

a similar tool that makes requests to the locally configured proxy DNS server

dnsq(1)

a similar tool that makes requests to content DNS servers

tinydns-get(1)

a tool that makes direct queries against a content DNS server's database

History

host was an addition to Daniel J. Bernstein's djbdns toolset by Jonathan de Boyne Pollard.

The ip6.int. superdomain was deprecated by RFC3152 in 2001 and obsoleted by RFC4159 in 2005, years before this tool was written.

Author

Original code and documentation by Jonathan de Boyne Pollard.