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. Until you do, every other DNS server says: "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
Once a DNS server looks up an answer, it remembers it for a set amount of time, called the TTL (time to live). That's why a brand-new or changed record can take a little while to show up everywhere: some servers are still remembering the old answer (even an old "never heard of it") until their TTL runs out.
IPv4 vs IPv6
- IPv4 addresses are 32 bits long. That makes 4,294,967,296 addresses (about 4.3 billion), and we've basically 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 (about 340 undecillion). That's... a lot. We're not running out of those.
IPv6 has so many more addresses simply because each address is longer.
Subdomains
techlikeimfive.com/blogis a path. It uses the main domain's 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.
Subdomains cost $0.00. Even www. is one!
Aliases (CNAME)
Michael, a.k.a. Mike: same guy, two names. A CNAME record works the same way. If a blog service names your blog something long like techlikeimfive.bloghost.example (that's a mouthful), a CNAME lets blog.techlikeimfive.com be a short, friendly 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..
What tech topic should we explain next? Let us know in the YouTube comments!