A user-friendly replacement for dig or nslookup that allows you to query the DNS for information about a domain is host. Using host, you can query a specific domain record and by default look up the address mapping of a host name.
In this example, host has queried the name server that is authoritative for the smuvelious.org domain and has found that the host name test.smuvelious.org is actually a CNAME for www.smuvelious.org with an address of 188.8.131.52.
If you want to find a specific domain record for a domain, you use the -t option, specifying the record type:
bible:~ # host -t mx disruptive.org.uk disruptive.org.uk mail is handled by 10 a.mx.disruptive.org.uk. disruptive.org.uk mail is handled by 20 backup.mx.bytemark.co.uk.
Here, host has queried the name server that is authoritative for disruptive.org.uk, asking for the MX record for the domain. It has found that there are two mail exchangers, a.mx.disruptive.org.uk and backup.bytemark.co.uk, with a.mx.disruptive.org.uk taking precedence over backup.bytemark.co.uk.
Was this article helpful?