Unit 1 · How the web works
Domain vs hosting vs DNS: what each one does
A domain is a name you rent. Hosting is a computer that stores your files and answers requests. DNS is the phone book that points the name at that computer. They are separate, often from separate companies.
The mix-up
What people often think
“Buying a domain gets you a website.”
What the tutor says
A domain is just the name. The files need a server, which is a separate thing you set up or pay for.
If you bought a domain today and did nothing else, what would visitors see?
How it works
If you bought a domain today and did nothing else, visitors would see an error or a parking page. The name has nowhere to point yet, because no server holds your files.
The domain stays yours when you change hosts. Moving to a new host means uploading the files there, then changing the DNS record so the name points at the new server. Until DNS changes, every visitor still reaches the old one.
A quick way to keep them apart: domain is the name, DNS is the phone book, hosting is the building, and the browser is the visitor who looks up the address and walks in.
Close cousins of this mix-up
The tutor watches for these in the same lesson.
“The domain name is where the website is stored.”
A domain is only a name you rent, like a listing in a phone book. The files sit on a server, and DNS points the name at it.
“A domain belongs to the company that hosts the site.”
The domain stays yours when you change hosts. You only change where DNS points it.
“The files and the name move together.”
The new server already has the files. The name just has not been pointed there yet.
Practise it with a tutor watching
The request journey
Trace a request from the address bar to a server and back.
Free with an account. The first two units need no account.