
What is the difference between a domain name and web hosting?
A domain name is the address people type to reach your website, such as example.com, while web hosting is the server space where your website's files, databases, and code actually live. The domain is registered with a domain registrar and points to your host through DNS records, and the host serves the pages when visitors arrive. You need both for a working website, but they're separate services that can be bought from different companies, changed independently, and renewed on different schedules.
People mix them up because many companies sell both and bundle them together at sign-up. This article explains what each one does, how they connect, what happens when you change one without the other, and how to decide whether to keep them together or apart.
The Short Version
A common analogy is a shop:
- The domain name is the shop's street address. It tells people where to go.
- The web hosting is the building itself, where the stock is kept and customers are served.
- DNS is the map that connects the address to the building.
You can move your shop to a new building and keep the same address by updating the map. That's exactly what happens when you change web hosts and keep your domain.
What Is a Domain Name?
A domain name is a unique, human-readable name registered in the global DNS. When you register one, you get exclusive use of it for a set period, typically one to ten years, as long as you renew it. On its own, a domain doesn't store any content. It's a pointer.
With a domain you control:
- Its nameservers, which decide which DNS provider answers for it.
- Its DNS records, which point the name at your web host, email provider, and other services.
- Its registration, including renewals, contact details, transfer lock, and privacy settings.
For a fuller explanation, read what a domain name is and how it works.
What Is Web Hosting?
Web hosting is a service that stores your website and makes it available on the internet. A host runs servers that are permanently connected to the network and respond to requests from browsers. Hosting typically includes:
- Storage for your HTML, images, scripts, and uploads.
- Compute to run server-side code such as PHP, Node.js, or Python.
- Databases such as MySQL or PostgreSQL for dynamic sites.
- Bandwidth for sending pages to visitors.
- SSL/TLS certificates, often issued automatically, so your site loads over HTTPS.
- A control panel or dashboard for managing files, backups, and settings.
Common Types of Hosting
| Type | What it is | Good for |
|---|---|---|
| Shared hosting | Many sites on one server, sharing resources | Small sites and blogs on a budget |
| VPS | A virtual server with dedicated resources | Growing sites needing more control |
| Dedicated server | A whole physical server for one customer | High-traffic or specialised workloads |
| Managed WordPress | Hosting tuned and maintained for WordPress | WordPress sites without server admin |
| Cloud and serverless platforms | Scalable infrastructure billed by usage | Apps and modern frameworks |
| Static hosting and CDNs | Serve pre-built files from edge locations | Static sites, documentation, landing pages |
| Website builders | Hosting, editor, and templates in one | Simple sites with no technical work |
Every type of hosting needs a domain pointing at it if you want visitors to use your own address rather than a host-provided one such as yoursite.hostingprovider.example.
Domain Name vs Web Hosting at a Glance
| Domain name | Web hosting | |
|---|---|---|
| What it is | The address of your site | The server that stores and serves your site |
| Bought from | A domain registrar | A hosting provider |
| Typical billing | Yearly, or multi-year | Monthly or yearly |
| Typical cost | Usually modest per year for common extensions | Ranges from a few pounds a month to much more |
| What you control | Nameservers, DNS records, registration details | Files, databases, server settings |
| Can exist without the other | Yes, for email-only or parked domains | Yes, on a temporary host-provided address |
| What happens if it lapses | The address stops working and can eventually be lost | The site goes offline, but the address remains yours |
How a Domain Connects to Hosting
The link between your domain and your hosting is made in DNS. There are two common ways to set it up.
Option 1: Point the Nameservers at Your Host
Your host gives you nameservers, such as ns1.hostingprovider.example and ns2.hostingprovider.example. You enter them at your registrar, and the host then manages all your DNS records. This is simple, but it puts your email and other records in the host's hands too. Our guide on how to change nameservers shows the process.
Option 2: Keep Your DNS and Add Records
You keep your DNS with your registrar or a dedicated DNS provider and add records that point at the host:
$ORIGIN example.com.
@ 3600 IN A 203.0.113.25
www 3600 IN CNAME example.com.
@ 3600 IN MX 10 mail.mailprovider.example.
Here, 203.0.113.25 is the IP address your host gave you. Email still goes to your separate mail provider. This approach keeps more control in one place and makes it easier to change hosts later. The trade-offs are covered in registrar DNS vs third-party DNS and the step-by-step move in how to point a domain to a new host.
Checking How a Domain Is Set Up
You can see which company handles each part of any domain with a few commands. First, the nameservers, which tell you who runs DNS:
dig +short example.com NS
ns1.dnshost.example.
ns2.dnshost.example.
Then the IP address the site points to, which tells you where it's hosted:
dig +short example.com A
203.0.113.25
Then the registrar, which tells you where the domain itself is registered:
curl -s https://rdap.org/domain/example.com \
| jq -r '.entities[] | select(.roles | index("registrar")) | .vcardArray[1][] | select(.[0]=="fn") | .[3]'
Example Registrar, Inc.
Finally, check that the web server is answering:
curl -sI https://example.com | head -n 5
HTTP/2 200
content-type: text/html; charset=UTF-8
server: nginx
date: Mon, 26 Oct 2026 09:12:44 GMT
cache-control: max-age=600
Three different companies can easily show up in those results: one registrar, one DNS provider, and one host. That's normal and often a good setup. If you're new to dig, see how to check DNS records.
What Happens When You Change One
Because they're separate, you can change one without the other.
Changing Your Web Host
- Set up your site on the new host and test it using a temporary address or a hosts-file entry.
- Lower the TTL of your DNS records a day or two in advance, as explained in how to lower TTL before migration.
- Update the A, AAAA, or CNAME records to the new host.
- Keep the old host running until traffic has moved over, then cancel it.
Your domain registration doesn't change at all.
Changing Your Registrar
Transferring a domain to a new registrar moves the registration, not the website. If your DNS is hosted elsewhere and your nameservers don't change, the site and email keep working throughout. See how to transfer a domain to another registrar.
Letting One Lapse
- If hosting lapses, the site goes offline or shows a suspension page, but you still hold the domain and can point it somewhere else.
- If the domain lapses, the site and email stop working for everyone, even though the hosting is still paid for. If it isn't renewed in time, you can lose the name permanently. See what happens when a domain expires.
A lapsed domain is the more serious problem, so keep auto-renew on.
Should You Buy Domain and Hosting Together?
Many hosts include a free domain for the first year. It's convenient, but think about the long term.
Benefits of Bundling
- One account and one bill.
- Automatic setup: The host configures DNS for you.
- One support team if something goes wrong.
Benefits of Keeping Them Separate
- Easier to change hosts: You only update DNS records rather than transferring the domain.
- Less risk if the host has problems: An account suspension, billing dispute, or outage at the host doesn't trap your domain.
- Clearer renewal pricing: Free first-year domains often renew at a higher price than a dedicated registrar charges.
- Better domain security features: Dedicated registrars commonly offer stronger account security, registrar lock controls, and DNSSEC.
For most businesses, keeping the domain at a dedicated registrar in an account you control, and pointing it at whichever host you use, is the more resilient choice. If you do use a bundle, make sure the domain is registered in your name, that you have access to the account, and that you know how to get the auth code if you ever leave. For running the two separately, see how to use your registrar and DNS host separately.
Do You Always Need Both?
Not always:
- Email only: You need a domain and an email provider, but no web hosting.
- Redirect only: You can forward a domain to another website using your registrar's forwarding feature, with no hosting. See what domain forwarding is.
- Reserved names: Domains held for future projects or brand protection need no hosting.
- Testing a site: You can build on hosting using a temporary address before you buy a domain.
For a live public website under your own name, though, you need both.
Common Points of Confusion
- "My host owns my domain." If the host registered it on your behalf, check the registrant details. The domain should be in your name, even if the host is the registrar.
- "I paid for hosting, so my domain renews automatically." Not necessarily. Domains and hosting often have separate renewal dates, even in the same account.
- "Moving hosts means moving my domain." No. You only need to update DNS.
- "SSL comes with the domain." SSL certificates are usually provided by your host or CDN, not the registrar. See what an SSL/TLS certificate is.
- "Email lives on the domain." Email is hosted by an email provider. The domain's MX records just tell other servers where to deliver it.
FAQ: Domain Name vs Web Hosting
Yes. You can register a domain and leave it parked, use it only for email, or forward it to another website. You only need hosting when you want to publish your own website on it.
Yes. Most hosts give you a temporary address or IP so you can build and test your site. To publish it under your own address, you'll need to register a domain and point it at the host.
It's simpler, but not always better. Keeping the domain at a separate registrar makes it easier to change hosts and protects the domain if something goes wrong with the hosting account. Either works as long as the domain is in your name and your account.
No, as long as the domain is registered separately or remains active in your account. Cancelling hosting takes the website offline, but the domain stays yours until its registration expires.
Either change the domain's nameservers to the ones your host provides, or keep your current DNS provider and add an A record or CNAME pointing to the host. Your host's setup guide will tell you which values to use.
Usually hosting. A standard domain typically costs a modest amount per year, while hosting ranges from a few pounds a month for shared plans to much more for managed or high-traffic setups. Premium domains are the exception and can cost far more than hosting.
Conclusion
A domain name is your website's address and web hosting is where the website lives. The domain is registered with a registrar, the hosting is provided by a host, and DNS records connect the two. Because they're separate services, you can change your host without changing your domain, and transfer your domain without moving your site.
Treat your domain as the more important of the two. Hosting can be replaced in an afternoon, but a lost domain can take your website, email, and reputation with it. Keep it in your own account, turn on auto-renew and registrar lock, and point it at whichever host suits your site today.


