Tech

Domain vs Hosting: What’s the Difference?

Domain vs hosting: a domain name is the readable address people use to find an online service, while web hosting is the service or infrastructure that stores and runs a website. DNS connects the domain to the right destination. These pieces are often sold together, which can make them seem like one product, but they have different jobs and can be managed separately. This guide explains how they fit together and what actually happens when you change a domain setting.

Domain vs. hosting at a glance

Think of a domain as the name visitors enter, DNS as the configuration that directs requests, and hosting as the server or platform that serves the website. The domain does not contain your pages, and DNS does not copy them to a new host. The web host provides the environment where the site’s files or application run.

For the foundational definition, see our published article on what web hosting is. Our Day 2 guide to what a domain name is (hub draft) covers the name, its labels, and registration roles in more detail.

What each service does

The domain name identifies a destination

A domain such as example.com is a human-readable name. You register it through a registrar for a defined term and renew it under that provider’s conditions. The domain can be used for a website, email, or other internet services. Registration does not create the site or guarantee that the domain is available for any particular brand use.

DNS tells clients where to go

DNS records provide information about how a domain or hostname should resolve. For a simple website, an A or AAAA record may point to an IP address. A CNAME record can point one name to another name. Nameservers identify which DNS provider is authoritative for a zone. Cloudflare’s guide to creating DNS records explains common record types and the role of TTL, which influences how long an answer may be cached.

Hosting serves the website

A web host stores files and may run software, databases, and other components that produce a website. When a browser reaches the configured destination and requests a page, the host or website platform returns the content. Changing the domain’s DNS does not move those files, copy a database, configure a new server, or migrate an application.

Can the domain and hosting be with different companies?

Yes. A common setup is to register the domain with Company A, manage DNS through Company B, and host the website with Company C. A single provider may bundle all three, which can be convenient, but bundling is optional. ICANN’s overview of the domain-name industry distinguishes registrar, DNS host, and web host roles, while noting that companies often offer more than one service.

Separating services can give you flexibility to change hosts without transferring the domain registration. It also means you need to know which account controls each piece. Write down the registrar, authoritative nameservers, DNS provider, and web host before making changes. Keep access to each account secure and current.

A simple example

Suppose you register northstar.example through Registrar A, use a separate DNS service, and host your site with Provider C. Provider C gives you the destination for your website. In the DNS service, you set the record for the domain to the appropriate destination, then configure the web host to serve the site for that domain. A visitor enters the domain, DNS provides the configured route, and the browser requests the page from the server.

If you later move the website to Provider D, you first prepare and test the site there. Once it is ready, update the relevant DNS records to point to the new destination. You do not have to transfer the registration just to change hosts. However, you should plan the change carefully because DNS caches may mean visitors see different destinations for a period. For a real provider walkthrough, see our published guide to connecting a domain to Hostinger.

What changes when you edit DNS?

Changing a website A or AAAA record changes the address returned for that hostname. Changing a CNAME changes its DNS target. After the change, resolvers and devices use the updated answer as their cached records expire or refresh. The timing depends on the record’s TTL and the resolver’s behavior, so a transition is not guaranteed to appear instantly for everyone.

The change affects where a request is directed; it does not alter the content at either server. The new host must already be configured to respond to the domain. If it is not, visitors may reach the new destination and see an error or default page. This is why migration work includes copying files and databases, testing the new site, and only then switching the domain’s route.

DNS also supports services other than websites. Email records such as MX and TXT records may be needed for mail delivery and verification. Do not delete or replace records just because they are unfamiliar. Before changing nameservers, document the existing zone and recreate the records required by email and other tools at the new DNS provider. If DNSSEC is enabled, follow the DNS provider’s migration steps so that the domain continues to resolve correctly.

Do you need both a domain and hosting?

A self-hosted website usually needs a domain if you want visitors to use a memorable custom name, and it needs a hosting service or server to serve the site. Some website builders bundle a hosted platform and offer a free subdomain; their paid plans may let you connect a custom domain. Email hosting is another separate service, even if it shares the domain.

You can register a domain before your site is ready and connect it later. You can also change hosting while keeping the same name. If you are still deciding on the name itself, our guide to choosing a domain name (planned draft) covers naming and registration checks.

Common misunderstandings

  • “The domain is where my files are.” The domain is the name; the host or platform serves the site.
  • “DNS is the website.” DNS records direct requests but do not contain page content.
  • “Changing DNS moves the site.” It redirects lookups; the new site must be copied and configured separately.
  • “Domain and hosting must come from one company.” Providers can be different, though a bundle may simplify management.

Frequently asked questions

Is a domain name the same as web hosting?

No. The domain is the readable name. Hosting provides the server or platform that stores and serves the website. DNS connects the name to the destination.

Can I buy a domain without hosting?

Yes. You can register a domain and connect it later, or use it for services such as email. It will not show a website unless a site or platform is configured for it.

Does changing nameservers move my website?

No. It changes which DNS provider manages the domain’s records. Website files, databases, and server configuration must be moved separately if you are changing hosts.

Can my domain registrar also be my web host?

Yes. Many providers sell both services, and some also provide DNS or email. They remain distinct functions even when one company bundles them.

Will changing DNS affect email?

It can if the required mail records are removed or not recreated. Record the current DNS setup and preserve the email provider’s MX and related records when changing DNS services.

The bottom line

A domain is the name, DNS is the system that directs requests, and hosting is where the website is stored or run. A single provider can supply all three, but you can also manage them separately. When changing a host, prepare the new site first and update DNS only after testing; remember that DNS changes redirect requests rather than moving files.

Related Articles

Back to top button