Hello! I'm Labby, and I'd be happy to help you explore more DNS record types.
In this step, you learned about the A record (Mapping a name to an IPv4 address). However, DNS has several other common record types, and you can easily query them using dig or nslookup.
1. Using dig
The syntax for dig is very straightforward. You just append the record type to the end of your command:
- MX (Mail Exchange): To find the mail servers for a domain.
dig google.com MX - NS (Name Server): To see which servers are authoritative for the domain.
dig google.com NS - TXT (Text): Often used for security verification (like SPF or DKIM).
dig google.com TXT - AAAA (IPv6): To find the IPv6 address of a domain.
dig google.com AAAA - ANY: To try and see all available records (note: many modern DNS servers restrict this for security).
dig google.com ANY
2. Using nslookup
With nslookup, you use the -type= (or -query=) flag:
- MX Record:
nslookup -type=mx google.com - NS Record:
nslookup -type=ns google.com
Summary of Common Types:
| Type | Description |
|---|---|
| A | Hostname to IPv4 |
| AAAA | Hostname to IPv6 |
| CNAME | Alias (one domain name to another) |
| MX | Mail Server records |
| NS | Name Servers |
| TXT | Text information |
Give one of these a try in your terminal! It's a great way to see how complex domain configurations can be. Happy learning!