Domain Names
Human-readable text strings that act as aliases for numerical IP addresses.
What is a Domain Name?
While computers require numerical IP addresses (like 142.250.190.46) to locate each other, humans are terrible at memorizing random numbers.
A **Domain Name** (like google.com) is a human-readable alias that sits on top of an IP address. It acts as an easy-to-remember shortcut so you don't have to memorize strings of numbers.
Why Developers Need It
Beyond just making websites accessible to humans, domain names dictate browser security.
Browsers enforce the **Same-Origin Policy** and **CORS** based on domains. A script running on api.yoursite.com cannot automatically access data on app.yoursite.com without explicit permission, because the browser treats different subdomains as completely separate origins.
The Domain Hierarchy
Domain names are read from right to left, moving from the broadest category to the most specific.
**1. TLD (Top-Level Domain):** The furthest right section (e.g., .com, .org, .dev). These are managed by a global organization called ICANN.
**2. Second-Level Domain:** The main brand name you buy (e.g., google in google.com).
**3. Subdomain:** The prefix added to the left (e.g., www, api, blog). You can create infinite subdomains for free once you own the second-level domain.
Domain Dissector
Tap the different parts of the URL below to dissect and understand the anatomical structure of a web address.
Check yourself
Pick an answer to lock it in, then read why. Getting one wrong is part of how it sticks.
Remember this
- Domain names are human-readable aliases for IP addresses.
- Domains are read from right to left, getting more specific (TLD -> Second-Level -> Subdomain).
- A Domain Name is just one component of a full URL.
Done with this concept?
Mark it complete to track your progress. No login needed.