Become The Solution Chicago Logo

How To: Mac Terminal Lookup DNS Records of a Domain Name

How To: Mac Terminal Lookup DNS Records of a Domain Name

You can use Terminal in Mac to lookup any and all associated host records for any domain name on the Internet. This is useful if you want to know certain information about a website or domain including geolocation of website hosted, check for email mx records, and validating a domain SPF record.


1. Open Terminal (Applications -> Utilities -> Terminal)

2. To get a list of host commands type

host –help


Usage: host [-aCdlriTwv] [-c class] [-N ndots] [-t type] [-W time]

            [-R number] [-m flag] hostname [server]

       -a is equivalent to -v -t ANY

       -c specifies query class for non-IN data

       -C compares SOA records on authoritative nameservers

       -d is equivalent to -v

       -l lists all hosts in a domain, using AXFR

       -i IP6.INT reverse lookups

       -N changes the number of dots allowed before root lookup is done

       -r disables recursive processing

       -R specifies number of retries for UDP packets

       -s a SERVFAIL response should stop query

       -t specifies the query type

       -T enables TCP/IP mode

       -v enables verbose output

       -w specifies to wait forever for a reply

       -W specifies how long to wait for a reply

       -4 use IPv4 query transport only

       -6 use IPv6 query transport only

       -m set memory debugging flag (trace|record|usage)

3. We will use –a to find out all records associated with Type the following command into Terminal.

host –a

Mac terminal list host dns records google


4. We see a list of all associated records for At the bottom, the query was performed using google DNS which we have configured on our Mac network connection.

* Please use the comment form belowFor LIVE chat updates, use the SHOUT BOX below.*


Related Posts



No comments made yet. Be the first to submit a comment
Sunday, 16 December 2018

Shout Box!

HelenV - 12/12/2018 - 08:32

just got msg on my 7plus that someone is trying to sign in with my apple id in Nanjing, Jiangsu and I am in Athens Greece. Good thing I have 2 factor.

Alex - 11/12/2018 - 16:29

My TT-BH040 won't pair with another device besides my iPhone. I'm trying to pair them with my Windows 10 laptop.

iphone user - 10/12/2018 - 13:36

iphone xs max sometimes after unlocking does not switch horizontal to vertical view. I usually end up powering off and on. Latest iOS .12.1.1

Anonymous - 05/12/2018 - 23:17

Where can I get this App?

Mike - 05/12/2018 - 23:17


User - 26/10/2018 - 08:55

Have been habving this issue last hour. Unreal hinge is trash

Follow Us Online!
Become The Solution Facebook PageBecome The Solution Twitter Solution ChicagoBecome The Solution Google PlusBecome The Solution InstagramBecome The Solution LinkedInBecome The Solution YouTube

Subscribe to Become The Solution!