Tools & Infrastructure

DNS and Domains for Beginners

What actually happens when you type a web address — and why the internet needs a phone book.

Scroll to start

The Internet's Phone Book

When you type "google.com" into your browser, your computer has no idea where "google.com" is. Computers talk to each other using numbers — called IP addresses — like 142.250.80.46. DNS (Domain Name System) is the system that translates the name you type into the number the computer understands.

Think of it like a contacts list on your phone. You tap "Mom" and your phone looks up her number. DNS works the same way — you type a name, and it looks up the computer's number. The whole internet runs on this idea of mapping easy-to-remember names to hard-to-remember numbers.

A domain name has several parts. Take "mail.google.com":

  • .com — the TLD, or top-level domain (the category)
  • google — the actual name you paid for
  • mail — a subdomain, pointing to a specific server or service

You can buy any name that is not already taken, add your own subdomains, and point them wherever you want. That is the basics of how domain ownership works.

DNS Is the Backbone of the Modern Web

Every time you visit a website, send an email, or stream a video, DNS is working behind the scenes. It is one of the most critical pieces of internet infrastructure — and most people have never heard of it. If DNS stopped working, the internet as we know it would grind to a halt. No one could reach any website by name.

DNS also does more than just point names to numbers. It controls where your email gets delivered, lets you run multiple websites on one server, and can route traffic intelligently — sending users to the closest server to make pages load faster.

💡 Key Insight

Without DNS, you would have to memorize strings like 142.250.80.46 for every website you wanted to visit. It would be like needing to know every person's social security number instead of their name to make a phone call.

For anyone building websites or apps, understanding DNS means knowing how traffic flows, how to connect a domain you bought to your server, and how to troubleshoot when things go wrong. It is foundational knowledge that pays off fast.

From URL to Webpage in Milliseconds

Here is the step-by-step journey when you type a web address and hit Enter. It all happens in under a second:

The DNS Lookup Journey
🌐
Browser
You type a URL and press Enter
📖
DNS Resolver
Asks "where is this domain?"
🌳
Root Server
Points to the right TLD server
📂
TLD Server
Points to your domain DNS
🖥️
Your Server
Gets the IP address
Browser
Loads the page!
repeat for every new domain

Each step is cached along the way, so the next time you visit the same site it loads even faster — the answer is already remembered somewhere nearby.

Setting Up a Domain to Point to Your Server

Imagine you bought a domain called "mycoolapp.com" and you want it to point to a server you rented. You go to your domain registrar dashboard and set up an A record. Here is what that looks like:

DNS A Record
Record Type : A
Name        : mycoolapp.com
Value       : 192.0.2.42
TTL         : 3600 (1 hour)

That A record tells the internet: "When someone asks for mycoolapp.com, send them to the computer at 192.0.2.42." Once saved, it can take a few minutes to a few hours for the change to spread across the world — this waiting period is called DNS propagation.

CNAME Record
Record Type : CNAME
Name        : www
Value       : mycoolapp.com
TTL         : 3600

This CNAME says: "Whatever www.mycoolapp.com is, look it up the same way you look up mycoolapp.com." It keeps things in sync automatically — if you change your A record, the CNAME follows automatically.

Knowledge Check

Test what you learned about DNS and domains with this quick quiz.

Quick Quiz — 3 Questions

Question 1
What does DNS stand for?
Question 2
What is an IP address?
Question 3
What does a DNS A record do?
🏆

You crushed it!

Perfect score on this module.