DNS cheat sheet: everything from the video on one page
The quick-reference version of "DNS Explained... Like I'm Five." Records, TTL, IPv4 vs IPv6, subdomains and aliases.
Just watched DNS Explained... Like I'm Five? Here's the whole thing on one page.
The big idea
DNS is like the Contacts app on your phone, but for computers. You don't memorize your mom's phone number; you just tap "Mom" and your phone looks up the number for you.
Computers are terrible with names. They talk to each other using numbers called IP addresses. When you type a name like techlikeimfive.com into your browser, your browser asks a DNS server, "What's the number for this name?" and then connects to that number.
DNS records
Each contact in DNS is called a record. When you set up a new website, you add records at the DNS servers that are in charge of your domain. That's usually done through the company where you bought the domain, or by asking your company's DNS administrator if you're doing it at work. Until the record exists, DNS servers have no idea where to send your browser: "Never heard of it."
| Record | What it does | Example |
|---|---|---|
A |
Points a name at an IPv4 address | 203.0.113.10 |
AAAA ("quad A") |
Points a name at an IPv6 address | 2001:db8:85a3::8a2e:370:7334 |
CNAME |
Makes a name an alias of another name | blog.techlikeimfive.com could be set up to be an alias, if we wanted to host the blog with a hosted blog service. |
(These are special example addresses that are set aside for documentation, so they never belong to a real computer.)
TTL: patience, please
Every DNS record comes with a TTL (time to live). It tells DNS servers how long they can remember the answer before they need to check again. That's why a changed record can take a while to work everywhere: servers that already looked up the old answer keep using it until its TTL runs out.
IPv4 vs IPv6
- IPv4 addresses are 32 bits long. That makes 4,294,967,296 addresses (just under 4.3 billion), and the world has run out. Sold out!
- IPv6 addresses are 128 bits long. That makes 340,282,366,920,938,463,463,374,607,431,768,211,456 addresses (roughly 340 undecillion). That's... a lot. We're not going to run out of those any time soon.
IPv6 exists in large part because the world ran out of IPv4 addresses. It has so many more addresses simply because each address is longer.
Subdomains
techlikeimfive.com/blogis a path. Anything after the slash still uses the main domain's A record, so it goes to the same servers as the main site.blog.techlikeimfive.comis a subdomain. It gets its own DNS record, so it can point somewhere completely different: a different app, a different server, or even a service that specializes in hosting blogs.
Once you own a domain, subdomains cost $0.00. Even www. is just a subdomain!
Aliases (CNAME)
Michael, a.k.a. Mike: same guy, two names. In DNS, aliases are called CNAME records. Say we hosted our blog with a blog service, and it set the blog up as techlikeimfive.bloghost.example (that's a mouthful). We could create a CNAME so blog.techlikeimfive.com becomes an easy-to-type alias for it.
One rule: a CNAME can't go on the bare domain (techlikeimfive.com itself), which is why the alias goes on a subdomain like blog..
There are more DNS record types and details out there; this is just the basics. What other tech topics should we explain like you're five? Let us know in the YouTube comments!