How it works · 11 of 36 Foundation
What is a subdomain, and what is a top-level domain (TLD)?
The parts of a name
Subdomain and top-level domain (TLD): A name reads right to left: the top-level domain (.com, .in, .ai) is the end; the domain is the part you rent; subdomains (mail., maps.) are rooms you add yourself at no extra cost.
Loading the animation…
Say it like this Read a web name from the right: the top-level domain is the ending, the domain is the part someone rents, and subdomains are rooms the owner adds for free.
Under the hood — for builders
- Real case: where does irctc.co.in end?
- Some endings have two parts. Under .in, co.in is itself a public ending, so the rented name is irctc.co.in, not co.in:
- How many endings there are
- IANA keeps the root list of every top-level domain. Most are generic; about 300 are two-letter country codes:
- How long a name can be
- Each part between dots is a label. The rules cap every label and the whole name:
- Subdomain
- Any name the owner puts in front of their domain: mail., shop., blog. They're set up in DNS, no registrar or fee.
- .ai and friends
- Some endings that look generic are country codes: IANA lists .ai as country-code.
- Measure it
- Read any link from the right. Find the ending (.in, or two-part ones like .co.in), then the label just before it: that's the owner.
- Watch out
- ashasbakery.in.example.com belongs to example.com. Phishing links put a trusted name on the left, where it means nothing.
- Sources
- IANA Root Zone Database and TLD list. Public Suffix List. RFC 1035 (size limits). Read 28 Nov 2026.
What happens in the subdomains and TLDs animation, step by step?
- A web name is read from the right. The last part, .in here, is the top-level domain (TLD): the land everything stands on.
- The part just before it, ashasbakery, is the domain: the building Asha rents on that land.
- Your turn: add subdomains. Each one is a new floor, and the owner makes them for free.
- Endings come in two kinds: country codes like .in and .uk, and generic ones like .com and .org. There are over 1,400.
- Watch out: ashasbakery.in.example.com is not Asha's. Read from the right: the owner is example.com, and "ashasbakery" is just a floor.
- The TLD is the end, the domain is the owner's, subdomains are rooms they add. Next: how does a name find its IP address?
What everyday example explains subdomains and TLDs?
Country, then street, then flat: the TLD is the country, your domain is your building, subdomains are the rooms inside.
Why should a team care about subdomains and TLDs?
Reading a link right to left is the quickest way to spot a phishing address before you click.