Domain Names vs Hosting: What's the Difference?

A domain name is the address people type to find a website, while hosting is the always-on server space where its files actually live.

Think of it like this

A domain name is like a signpost with your shop's name on it, and hosting is the rented unit where the shop actually trades. The signpost tells passers-by where to go, but it holds no stock of its own. If you move to a bigger unit across town, you don't need a new name - you simply turn the signpost to point at the new building.

What's happening

Diagram in four steps: a visitor's browser asks for example.com, a domain name shown as a signpost rented from a registrar; DNS records then point the name to the IP address 203.0.113.10 and send email to a separate email service; that address belongs to the hosting server where the website's files are stored; and the server sends the files back to the visitor's browser

Summary

A domain name and hosting are two separate things you rent: the domain is the name people use to find a site, and hosting is the server that stores and sends its files, linked together by DNS records.

A Closer Look

You never buy a domain name outright - you rent it. Domains are registered through companies called registrars, usually a year at a time, although you can often pay for several years ahead. Each ending, such as .com or .uk, is run by an organisation called a registry, which keeps the master list of who holds every name ending that way, and registrars sell names on its behalf. As long as you keep renewing, the name stays yours. If a renewal is missed, there is usually a grace period to rescue it, but after that the name is released and anyone can register it - including people who snap up lapsed names to resell them. Turning on automatic renewal and keeping your contact email up to date avoids this.

On its own, a domain doesn't lead anywhere. What connects it to your hosting is a set of DNS records, edited in a control panel that is usually at your registrar or your host. The key one for a website is normally the A record, which says "this name lives at this IP address" - the address of your hosting server. Another type, the MX record, says where email for the domain should be delivered, so your website and your email can be handled by completely different companies. When you change a record, the update isn't seen everywhere at once, because DNS answers are remembered for a while to keep lookups fast. It can take anywhere from a few minutes to a day or two before every visitor is sent to the new place.

Keeping the two separate in your mind pays off when things change. To move to a new host, you copy the website's files across and then update the DNS records so the domain points at the new server - visitors keep typing the same address and never notice the move. The domain itself can also be transferred to a different registrar, usually using a transfer code from the current one. Many companies bundle a domain and hosting together, which is convenient, but check one thing either way: the domain should be registered in your name, with an account you can log into. If a web designer or former colleague registers it in theirs, they are the official holder, and getting it back can be difficult if you fall out or lose touch.

Common Misconceptions

  • Registering a domain name doesn't give you a website - until it points at hosting with files on it, visitors see an error or a placeholder page.
  • You don't have to get your domain and hosting from the same company - they are separate services, linked only by DNS records that you can change at any time.
  • A domain isn't yours forever after one payment - it's rented for a set period, and if you stop renewing it someone else can register it.

Frequently asked questions

Can I have a domain name without a website?

Yes. Plenty of people register a name to protect it, to keep it for a future project or simply to use it for email. A domain with no hosting behind it shows nothing at all, or a placeholder page from the registrar. Most registrars also let you forward a domain, so anyone who types it is sent straight on to another address, such as an existing website or social media page.

Can I use my own domain name for email?

Yes, and it looks more professional than a free address. You sign up with an email provider that supports custom domains, then add the MX records it gives you to your domain's DNS settings, along with a few extra records that help prove your messages are genuine. From then on, mail sent to an address at your domain is delivered to that provider, whoever hosts your website.

What is the difference between hosting and a website builder?

A website builder is a tool for designing pages without writing code, and most include hosting in the package, so your site's files are stored on the builder's own servers. With plain hosting you get server space and supply the website yourself, whether hand-written or made with software you install. Builders are simpler to start with, while separate hosting usually gives more control and makes it easier to move elsewhere later.

How it connects

Domains and hosting rest on a few other building blocks:

Try it yourself

Open your terminal or command prompt and type nslookup -type=mx gmail.com. The answer lists the mail servers that receive email for that domain - a reminder that a domain's email and its website are handled by separate machines, and sometimes by entirely different companies.