Here's a preview from my zine, How DNS Works! If you want to see more comics like this, sign up for my saturday comics newsletter or browse more comics!
read the transcript!
to make a subdomain, you just have to set a DNS record!
To set up cats.yourdomain.com, create a DNS record like this in your authoritative nameservers:
cats.yourdomain.com A 1.2.3.4
yourdomain is the name
A is the record type
1.2.3.4 is the value
there are 2 ways a nameserver can handle subdomains
- Store their DNS records itself
nameserver, represented by a box with a smiley face wearing a crown: here’s the IP for cats.yourdomain.com!
- Redirect to another authoritative nameserver
(this happens if you set an NS record for the subdomain, it’s called “delegation”)
nameserver: ask this other DNS server instead!
you can create multiple levels of subdomains
For example, you can make:
a.b.c.d.e.f.g.example.com
up to 127 levels is allowed!
www is a common subdomain
Usually www.yourdomain.com and yourdomain.com point to the exact same IP address.
If you wanted to confuse people, you could make them totally different websites!
panel 5
Illustration of a smiling stick figure with curly hair.
person: I love using subdomains for my projects (like dns-lookup.jvns.ca) because they’re free, I can give a subdomain a different IP, and it keeps projects separate.
Saturday Morning Comics!
Want another comic like this in your email every Saturday? Sign up here!