Lesson 3 of 15
4. DNS

4.2 What are the parts of a domain name?

3 min read+10 XP

In your phone's contacts: A full address reads from small to big: "flat 4, Green Apartments, Hyderabad, India". Each part narrows it down, and each level is managed by someone different.

In the system: A domain name is a list of labels separated by dots, and it reads right to left, from big to small.

anatomy of shop.example.com: subdomain, registered domain, TLD and root.

Figure: read a domain right to left. Each level only needs to know about the level just below it.

  • Root: the invisible dot at the very end (shop.example.com.). Every lookup starts here.
  • Top-level domain (TLD): .com, .org, .dev, or a country code like .in or .de.
  • Registered domain: example.com. You rent it yearly through a registrar. Whoever owns it controls everything below it.
  • Subdomain: shop, www, api. The owner creates as many as they like, for free, by adding records.

Limits worth knowing: each label can be up to 63 characters, and the whole name up to 253 characters in normal text form.

Why this shape matters: it lets the work be split up. The root only knows who runs each TLD. The .com servers only know who runs each .com domain. The bookstore's own name servers know everything about example.com. Nobody has to hold the whole internet's phone book.

Memory code: "Right to left, big to small."