Updated: 3 November 2026 · Applies to: host, from the bind-utils / dnsutils package
host is a small, focused command-line tool for DNS lookups: translating a domain name to its IP addresses, checking its mail servers, name servers, or any other record type, directly from the terminal. If it is not already installed, add it with apt install -y dnsutils on Debian or Ubuntu, or dnf install -y bind-utils on AlmaLinux, Rocky Linux or RHEL.
Find a domain's IP addresses
host google.com
google.com has address 142.251.219.142 google.com has IPv6 address 2607:f8b0:4005:818::200e google.com mail is handled by 10 smtp.google.com.
Find a domain's name servers
host -t ns google.com
google.com name server ns1.google.com. google.com name server ns2.google.com. google.com name server ns3.google.com. google.com name server ns4.google.com.
Find a domain's mail servers (MX records)
host -t mx google.com
google.com mail is handled by 10 smtp.google.com.
Find a domain's TXT records
Useful for checking SPF, DKIM or domain verification records:
host -t txt google.com
google.com descriptive text "v=spf1 include:_spf.google.com ~all"
Find a domain's CNAME record
host -t cname www.github.com
Query a specific name server directly
Rather than your system's configured resolver, ask a particular server, useful for confirming a DNS change has actually reached one specific name server:
host example.com ns1.google.com
Force IPv4 or IPv6 only
host -4 example.com
host -6 example.com
Query every record type at once
host -a example.com
Get the full, verbose answer including TTL
host -v -t a example.com
Perform a non-recursive query
Asks the server to answer only from its own cache or authoritative data, without it recursing out to find the answer itself:
host -r example.com
Control retries and timeout
By default host tries once and waits a limited time for a reply. Increase retries with -R:
host -R 3 example.com
Or set how long to wait for a reply, in seconds, with -W:
host -W 10 example.com
For the full list of options, see the manual page:
man host