Who it’s for
You have a website, or you’re about to, and a domain you want to connect to it. You don’t need a technical background: every idea comes with a picture or an analogy.
What you’ll be able to do
Point your domain to any host. Choose between changing nameservers and adding records. Set up both yourdomain.com and its www the right way. Tell a redirect from DNS. And when something breaks, find out why and fix it.
How it works
Each lesson has two steps. Learn is a short explanation. Dojo is a hands-on challenge where you practise in a simulation. Both earn XP, and your progress is saved in this browser. Finish every lesson to unlock a free certificate you can download as PNG or PDF.
What’s inside
Every time you type a website name, your computer asks “where does this live?” and gets a number back in milliseconds. In this course you'll watch that conversation, then configure a domain yourself.
Keep the example or type any domain. Every simulation in the course will use it.
Computers use numbers
Every device online has an IP address, like 203.0.113.10. That’s how computers find each other.
People use names
Numbers are hard to remember, so we use names, like yourdomain.com.
DNS connects the two
The Domain Name System turns a name into its number. It’s the internet’s phone book.
Names stay, numbers change
When your site moves to a new server, only the number in the book changes. Visitors keep typing the same name.
DNS reads right to left
A name is made of parts separated by dots. DNS reads them from the end: first the root, then the TLD, then your domain, then any subdomain. Each step narrows the search.
The root
Every name really ends with a dot you never type: www.yourdomain.com. That final dot is the root, the top of the DNS tree. Root servers know where to find every TLD.
The TLD
The ending: .com, .org, .br… Each TLD is managed by one organisation, its registry (Verisign runs .com). The registry keeps the list of every domain under that TLD and which nameservers answer for each one.
Your domain
The name you rent, usually by the year, from a registrar: a company that sells domains and passes your settings on to the registry. Only one owner can hold a given name at a time.
Subdomains
Names you add in front of your domain: www, shop, blog. You create as many as you like, for free, as records in your own zone. Each one can point to a different server.
www.SubdomainHouse numberyourdomain.Your domainStreetcomTLDCity.RootCountryClick a part of the name above, or press the button.
A DNS server is simply a computer that answers DNS questions. Four of them work together like a relay, always in the same order: resolver → root → TLD server → authoritative nameserver.
Only the resolver talks to you. The root and the TLD server don’t know the IP address you’re looking for: they only say “ask that server next”. The authoritative nameserver is the only one with the real answer. Thanks to caching (lesson 2.2), the resolver can usually skip most of the trip.
ns1.hostco.net). Whoever runs them is your DNS provider.1 · You press Enter
Your browser needs the IP address of the name you typed. If it has no saved copy, it asks its resolver: “where is yourdomain.com?”
2 · The resolver asks for directions
The resolver asks a root server, which points it to the servers for the TLD (.com). The TLD server points it to your domain’s nameservers. Neither knows the IP: each one only says who to ask next.
3 · The nameserver answers
Your domain’s authoritative nameserver holds the records, so it replies with the IP address: 203.0.113.10.
4 · The visit can start
The resolver hands the IP to your browser, and both keep a copy for the TTL. Only now does the browser connect to the web server at that address and ask for the page.
Nothing is cached in the Dojo, so you’ll see the full trip every time.
A full lookup, from scratch
Your request will visit every server on the map.
A full lookup takes time
With no saved copy anywhere, the resolver has to ask the root, the TLD server and your nameserver, one after the other. That takes about 100 ms.
Answers are saved for a while
Every answer carries a TTL (time to live). The domain owner sets it on each record in their DNS zone. It says how many seconds a copy may be kept: 3600 means one hour.
Your browser keeps a copy
Your browser (and your computer) saves the answers it gets. Reusing that copy is instant: no question is sent over the network at all.
The resolver keeps a copy too
The resolver, run by your internet provider or a service like 1.1.1.1, saves answers for all of its users. If anyone asked recently, it replies straight away, in about 10 ms, without asking the other servers.
After you change a record, the world doesn't switch all at once. Nothing is really “propagating”: each resolver saved a copy of the old answer the last time one of its users visited, and keeps serving it until that copy's TTL runs out. Copies saved long ago expire first; a copy saved a minute before your change lasts almost a full TTL. Time zones have nothing to do with it.
Who answers for my domain?
Where you bought the domain. You set which nameservers are in charge. If you keep the registrar's own nameservers, you also edit your records there. Like the land registry.
Which site do I serve for this name?
Where your site runs. You add the domain to your site, so the server knows which site to show for it and can get an SSL certificate (the padlock). The host gives you nameservers or records to use. Like the house.
Either way, add the domain on the host.
Picture your domain as a folder. Each name is a folder and each record is a file inside it. A CNAME is a shortcut: it holds no files, it just says “go look in that other folder”.
Your goal: the root keeps its own files, and www follows HostCo. Make the two choices below, then resolve both names.
@ should be…
www should be…
Start with step 1: choose what the root should be.
Problem: the root holds an A record with a fixed IP. If your host moves to a new IP, the root breaks, while a www CNAME follows the host. The DNS standard can’t fix this: its only “follow another name” record, the CNAME, isn’t allowed on the root. So all three fixes live outside the DNS standard:
@ → sites.hostco.net; your DNS provider looks it up and answers with a normal A record. Names vary (Cloudflare: flattening, Route 53: Alias, others: ALIAS/ANAME), and many registrars don't have it.www.yourdomain.com, and www is a CNAME.Your goal: keep both names working when HostCo moves to a new IP.
@ as
www as
Your situation
You bought yourdomain.com at Registrar.example. Your site lives at HostCo. Right now the domain still shows the registrar’s parking page.
HostCo offers two ways to connect
Method A: at the registrar, switch to HostCo’s nameservers ns1.hostco.net and ns2.hostco.net. HostCo then hosts your DNS zone and creates the records for each domain you add on its side.
Method B: keep the registrar’s nameservers and add the records yourself in the registrar’s DNS panel: A @ 203.0.113.10 and CNAME www sites.hostco.net.
Either way, add the domain on HostCo
DNS only brings visitors to HostCo’s server. Adding yourdomain.com and its www on HostCo tells the server which site to show, and lets it get the SSL certificate.
This simulated registrar also offers ALIAS records, which many real ones don’t.
No domains yet. HostCo won't know which site to show.
ns1.hostco.net ns2.hostco.netDiagnostics
Results appear here, link by link.
What visitors see
| Record | What it says | Example |
|---|---|---|
| A AAAA | Name → IP address (IPv4 / IPv6) | @ → 203.0.113.10 |
| CNAME | Shortcut to another name (never on the root, never to an IP) | www → sites.hostco.net |
| MX | Where email goes (lower number = first) | @ → 10 mx.mailhost.com |
| TXT | Notes: verification, SPF, DKIM, DMARC | @ → "v=spf1 …" |
| NS SOA | Who runs the zone, and its ID card (automatic, on the root) | @ → ns1.hostco.net |
| CAA | Which authorities may issue SSL | @ → 0 issue "letsencrypt.org" |
DNS pointing (A or CNAME)
It works during the lookup: the name leads straight to a server. The address bar keeps showing your domain.
Redirect (301 or 302)
It’s a reply from a web server: “go to this other address instead”. The browser starts over at the new address, and the address bar changes.
DNS has no redirect
To send visitors from one domain to another, you always need a web server that answers with a redirect.
Compare side by side and see how to set up a redirect
| Question | DNS pointing | Redirect |
|---|---|---|
| Layer | DNS (name → IP) | HTTP (web server) |
| Address bar | Stays the same | Changes |
| Needs a web server? | No | Yes, to answer “301” |
| Can send to a path? | No | Yes, e.g. /promo |
At the registrar: open Domain → Forwarding, enter https://yourdomain.com and choose 301. Keep the registrar’s nameservers, and test with https.
At the host: point the old domain to the host, add it there, and turn on “redirect to primary domain”.
On your own server (nginx example):
server {
server_name old-domain.net www.old-domain.net;
return 301 https://yourdomain.com$request_uri;
}…
Most DNS problems come down to one broken link in the chain: the nameservers set at the registrar, a missing or wrong record, the domain not added on the host, or an old copy still cached. Each case shows what the owner sees, plus a clue. Choose the most likely cause.
A final check across the whole course. Answer every question.
Check your DNS yourself
After you connect a real domain, these commands show what the world sees. Open Terminal (Mac, Linux) and paste one; they already use your domain.
Which nameservers are in charge?
Should list the nameservers you set at the registrar, e.g. ns1.hostco.net.
dig NS yourdomain.com +shortWhere does the root point?
Should show your host’s IP address, e.g. 203.0.113.10.
dig A yourdomain.com +shortWhere does www lead?
Shows the CNAME target first, then the IP it leads to.
dig www.yourdomain.com +shortWhere does email go?
Lists your mail servers; the lowest number is tried first.
dig MX yourdomain.com +shortWhat does a public resolver see right now?
Try @8.8.8.8 too. If two resolvers disagree, one still has an old copy: wait one TTL.
dig A yourdomain.com @1.1.1.1 +shortHow long may copies be kept?
The number after the name is the TTL, in seconds.
dig A yourdomain.com +noall +answerOn Windows (no dig)?
Use nslookup in PowerShell; change NS to A, MX or CNAME as needed.
nslookup -type=NS yourdomain.com