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:
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:
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.
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 :)