What is web hosting and how is it different from a domain?

3 min read
Illustration showing how domain, DNS, hosting server and the website in the browser relate

Summary: A domain is the name (yourcompany.com), registered and renewed yearly. Hosting is the server, an always-on computer that stores the site's files and database, and sometimes email. DNS is the system that connects the two: it says which server hosts the site and where the domain's email goes.

Many people think they bought a website when they registered a domain. Then they discover they still need hosting. The confusion is natural: these are three different pieces, usually bought from different places, that have to work together.

The comparison that helps

  • Domain is the address: the name people type.
  • Hosting is the building: the space on a server where the site lives.
  • DNS is the registry that says which building each address belongs to.
  • Website is the store set up inside the building.

What happens when someone types your address

  1. The browser asks the DNS system for the IP address of www.yourcompany.com.
  2. The query reaches the domain's authoritative DNS servers (set in the domain registration), which reply with the hosting server's IP.
  3. The browser connects to that IP, negotiates a secure connection (TLS) and requests the page.
  4. The server runs the application (PHP, Node.js, etc.), queries the database if needed and returns HTML, CSS, JavaScript and images.

The DNS answer is cached for the time set in each record's TTL. That's why DNS changes take a while to apply for everyone (MDN: DNS).

The most common DNS records

Records and what they do
RecordFunctionExample
A / AAAAPoints a name to an IP (IPv4 / IPv6)yourcompany.com → 203.0.113.10
CNAMEPoints a name to another namewww → yourcompany.com
MXDefines the servers that receive email10 mail.yourcompany.com
TXTVerification and authentication text (SPF, DKIM, DMARC, Search Console)v=spf1 ...
NSThe domain's authoritative DNS serversns1.provider.com

To understand how these changes are published, see DNS publishing and propagation and DNS and domain registration.

Types of hosting

  • Shared: several sites share the same server. Cheaper, works well for institutional sites.
  • VPS: a virtual server with reserved resources. For stores, applications and higher-traffic sites.
  • Dedicated: an entire physical server just for you.
  • Cloud and managed platforms: resources that scale on demand, pay-as-you-go.
  • Static hosting: for sites without server-side processing, often served via CDN.

We compare the two most common in shared or VPS.

Who should own each piece

The domain should be registered to the business owner, with a company email. Hosting can be contracted by you or the agency, but you should have panel access or complete backups. That keeps you from being held hostage by a supplier.

What to look for when signing up

A server close to your audience, automatic off-server backups, automatic SSL, updated software, clear limits and technical support. We detail each point in how to choose hosting without falling into traps.

At hetsi we handle domain, hosting and website in one place, so you have a single contact when you need anything.

Sources and references

Frequently asked questions

Can I have a domain without hosting?

Yes. The domain can just stay registered, be used only for email or redirect to another address. To have a website, you need hosting.

Do domain and hosting have to be from the same company?

No. The domain can be at one registrar and point, via DNS, to any hosting.

What is DNS propagation?

The time until DNS caches around the world expire and start using the new configuration. It depends on the records' TTL and usually takes minutes to a few hours.

Does email have to be on the same hosting as the site?

No. MX records can point email to a different service from the website's server.

Want your domain, hosting and website in one place?

SSD storage, daily backups and a team that knows your website.

Read also

Written by Mário Moreno, founder of Agência hetsi, which has been building websites and handling digital marketing for businesses in Brazil and abroad since 2000. Mário Moreno on LinkedIn