host

Commonly used analytical domain name query tools

Supplementary instructions

host command is a commonly used analysis domain name query tool, which can be used to test whether the domain name system is working properly.

grammar

host(option)(parameter)

Options

-a: Display detailed DNS information;
-c<type>: Specifies the query type, the default value is "IN";
-C: Query the complete SOA record of the specified host;
-r: Do not use recursive query when querying domain names;
-t<type>: Specifies the type of domain name information to be queried;
-v: Display detailed information about command execution;
-w: If the domain name server does not give a response message, always wait until the domain name server gives a response;
-W<time>: Specify the maximum time for domain name query. If the domain name server does not give a response message within the specified time, the command will exit;
-4: Use IPv4;
-6: Use IPv6.

Parameters

Host: Specify the host information to be queried.

Example

[root@localhost ~]# host www.jsdig.com
www.jsdig.com is an alias for host.1.jsdig.com.
host.1.jsdig.com has address 100.42.212.8

[root@localhost ~]# host -a www.jsdig.com
Trying "www.jsdig.com"
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34671
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.jsdig.com. IN ANY

;; ANSWER SECTION:
www.jsdig.com. 463 IN CNAME host.1.jsdig.com.

Received 54 bytes from 202.96.104.15#53 in 0 ms