← All lessons
DNS, HTTP and other protocols · Lesson 2 of 7

DNS records

A domain's authoritative servers hold its records. Each record has a name, a type, a TTL and a value. Different types answer different questions about the same name.

quackgames.net.      3600  A      203.0.113.7
quackgames.net.      3600  AAAA   2001:db8::7
www.quackgames.net.  3600  CNAME  quackgames.net.
quackgames.net.      3600  MX     10 mail.quackgames.net.
quackgames.net.      3600  TXT    "v=spf1 include:_spf.mail.example -all"

A gives an IPv4 address and AAAA an IPv6 address. CNAME says "this name is another name for that one": look up the other one instead. It's handy when a service you use might change its addresses.

MX says which servers take email for the domain; the number is a priority, and lower numbers are tried first. TXT holds text, mostly used to prove you own a domain or to say which servers may send email for it (SPF). NS says which servers are authoritative for the domain.

You can look records up yourself with nslookup (on every system) or dig (on Mac and Linux): nslookup -type=mx gmail.com lists Gmail's mail servers.

Practice

Which record type gives an IPv4 address? (one letter)

More info