Skip to content
AITermsLab
–points–day streak

Domain vs hosting: what's the difference?

A domain is your website's name, like example.com, that people type. Hosting is the always-on computer that stores your site's files and sends them to visitors. You need both, and DNS connects them.

Last updated

What each one means

Domain name
A domain name is the easy-to-remember name of a website, like example.com, that you rent each year so people can find you.
Hosting
Hosting is renting space on a computer that's always online, so your website is available to everyone, day and night.

Side by side

Domain name compared with Hosting
Domain nameHosting
What it isYour site's name, like example.comSpace on an always-on computer that holds your site
What you getThe right to use that nameStorage, plus a computer that sends your pages to visitors
Where you get itA domain registrarA hosting company or a website builder
How you payYou rent it, usually by the yearUsually monthly or yearly, and some small plans are free
If you stop payingThe name stops working, and later someone else can buy itYour site goes offline, even though the name still works
SwitchingMove it to another registrar and keep the nameMove to another host and keep the same domain
In a shopThe name on the signThe shop building itself

An example: a bakery moves host

A bakery rents its .com name from a domain registrar and puts its site with a hosting company. In the domain's DNS settings, it points the name at that host. A year later it finds a cheaper host, copies the site over and updates the DNS. Customers keep typing the same name and never notice the move.

See the domain: take an address apart

The demo takes a web address apart with the domain name already selected. Tap the ending too, like .com or .co.uk, to see that the name you rent is the domain name plus its ending.

Or try:

Tap a piece

Domain nameThis lesson

The site's own name, the part you rent each year. Together with the ending, it's what people remember and type.

The domain name and its ending make up the name you rent, like example.com. Everything before and after it can change from page to page.

See hosting: close the laptop

Choose whether your site's files live on your laptop or with a hosting service, then let visitors in three cities try to open it. With the laptop closed, they all get an error. With hosting, every visit works.

Where do your site's files live?

Your website

A website is just files like these, plus an address people can type.

  • index.html
  • style.css
  • photo.jpg

Your laptop at home

Online

Visitors around the world

  • A visitor in LondonWaiting to visit
  • A visitor in New YorkWaiting to visit
  • A visitor in TokyoWaiting to visit

Running a site from your own laptop works only while it's on and connected. Close the lid, and everyone else gets an error.

Common questions

Can I buy a domain without hosting?

Yes. Many people buy a name first and keep it until the site is ready. On its own it shows nothing, or a placeholder page, until you point it at a host.

Do I have to buy both from the same company?

No. One company is simpler, but you can rent the name from one and the hosting from another, then connect them in the domain's DNS settings.

Does hosting come with a domain?

Sometimes. Some hosting plans include a free domain for the first year, after which you renew it at the normal price. Check the renewal price before you buy.