How to do DNS Lookups

Lookup DNS records

There are multiple ways to show a domains DNS records. The simplest way is to visit viewdns.com and just type the domain name into the search box, the results will include both present and also historical DNS records if any exists. In most cases, this is the simplest way to quickly view the DNS settings, faster than using the terminal.


Viewing DNS records in the terminal (Unix and MacOS)


Speaking about the terminal, if you still like to go old school and tab out (to the terminal). Then I suggest using the command dig. It provides all the data usually needed. Let me show you:

dig viewdns.com ANY

Results:
viewdns.com.	294		IN	A	104.27.142.166
viewdns.com.	294		IN	A	104.27.143.166
viewdns.com.	172794		IN	NS	kevin.ns.cloudflare.com.
viewdns.com.	172794		IN	NS	sue.ns.cloudflare.com.

View the DNS Records on a Windows machine

Windows command prompt offers a similar tool nslookup (also available on Unix/MacOS). Its super simple to use, just type nslookup {domainname} in the command prompt and you should see something like this:

nslookup viewdns.com

Results:
Server:		192.168.10.1
Address:	192.168.10.1#53
 
Non-authoritative answer:
Name:		viewdns.com
Address:	104.27.143.166
Name:		viewdns.com
Address:	104.27.142.166

In this case the A stands for A-Pointer which contains / points to the IP used for reaching the specific website / server, NS stands for NameServers and that is where your DNS records is stored. I've written more about this on viewdns.com

Getting specific type of records (Windows / Unix / MacOS):

For supplementary studies I recommend doing a few specific queries where you include the specific type.

nslookup -type=ns viewdns.com

Results:
Server:		192.168.10.1
Address:	192.168.10.1#53
 
Non-authoritative answer:
viewdns.com	nameserver = kevin.ns.cloudflare.com.
viewdns.com	nameserver = sue.ns.cloudflare.com.

These are the most common DNS record types:

  • A - Host address, often used to point towards a websites IPv4 address
  • AAAA - Host address, often used to point towards a websites IPv6 address
  • CNAME - Canonical Name, An alias, often used as a link towards the A records
  • MX - Mail exchange, used to point towards one email server
  • NS - Authoritative name server, specifies the master DNS server responsible.
  • PTR - Domain name pointer, similar to CName but reversed, connects the IP to a domain
  • SOA - Start of authority, marks the start of a new zone
  • SRV - Service records, similar to MX but more generic and can be used for other services
  • TXT - Text strings, often used to add comments about the DNS and also validating ownership / control of domain.

I hope you learned something from this, otherwise just viewdns.com which pretty much does everything for you :)



Your Computer


IP: 3.15.239.145
LAN:
Screen resolution:
Computer: Unknown
Browser: Unknown 5.0

View details »

WHOIS History

Search domains whois history with help of our tools. See who owned the domains before you and what has changed. View whois »

Trace IP

Avoid problems by knowing who or what you are talking with. See the geographical location of any IP address, just click the button and input the IP. Trace ip »