Free Astro tutorials for complete beginners.

Beginner's Guide to Astro

Domain Name vs Web Hosting: What's the Difference?

A domain name is your site's address. Hosting is the computer your site lives on. Here's how the two connect, in plain words, and what each one costs.

Cover image for Domain Name vs Web Hosting: What's the Difference?
In this guide
  1. The domain name is the address
  2. Hosting is where the files live
  3. How the two connect
  4. The one place people get confused
  5. What they cost, side by side
  6. Where to go next
  7. Frequently asked questions

Think of a house. The domain name is the street address. The hosting is the land and the building. You need both for people to visit, and they’re sold separately.

The domain name is the address

A domain name is what people type into the browser. For us, it’s astrobeginner.com. You don’t own a domain forever. You rent it, a year at a time, from a company called a registrar. A .com costs about $11 to $15 a year.

The domain does one job. It tells the browser where to go. Behind the scenes, it points at a computer somewhere. That pointer is a setting you can change any time, which is why you can move your site to a new host and keep the same address.

Hosting is where the files live

Hosting is a computer that stays on all day, holding your website’s files and handing them to anyone who asks. When someone types your domain, the browser asks that computer for the page.

For an Astro site, hosting is often free. That’s because an Astro site is a static site, a folder of finished files, and serving files is cheap. Cloudflare, Netlify and GitHub Pages all do it for free.

How the two connect

  1. You buy a domain from a registrar.
  2. You put your site on a host.
  3. In the host’s settings, you add your domain. The host tells you a setting to change at the registrar, usually called a DNS record or nameservers.
  4. You make that change at the registrar. Within a few minutes to a few hours, the domain points at the host.

That’s it. We did exactly this for astrobeginner.com: the domain is at one company, the hosting is at Cloudflare, and a nameserver setting joins them. How to register and connect a domain walks through each click.

The one place people get confused

Hosting companies also sell domains. Registrars also sell hosting. The checkout pages are built to make you buy both. You can, and it’s a little simpler. But if a hosting company’s domain price is high, buy the domain elsewhere. The connection step is the same either way.

What they cost, side by side

Domain name Hosting
What it is Your address The computer your files live on
Who sells it A registrar A host
Typical price for an Astro site $11 to $15 a year Free
Can you change it later? Yes, with a redirect Yes, by pointing the domain at the new host

Where to go next

Frequently asked questions

Do I need to buy them from the same company?

No. Many people buy the domain in one place and host somewhere else. You connect them with a few settings. Buying both from one company is simpler, but not required.

Can I have hosting without a domain?

Yes. Your host gives you a free address like yoursite.pages.dev or yoursite.netlify.app. It works, it just isn't pretty.

Can I have a domain without hosting?

Yes. People buy a name and park it for later. Nothing shows at the address until you point it at a host.

Stuck on a step?

Check the common errors guide, look up a word in the glossary, or ask the friendly people in the official Astro and EmDash Discords. How to ask so people can help.

Keep reading

  1. How Much Does an Astro Website Cost? (Real Numbers)

    An Astro site can cost $0 a year. Here's what's free, what costs money, and what we actually pay for this site, so you can plan before you start.

    Beginner's guides, 6 minute read, November 8, 2026

  2. How to Back Up an Astro Site (It's Easier Than You Think)

    An Astro site is a folder of files, so the backup is GitHub. Here's why that's complete, how to do it in two clicks, and the one thing it doesn't cover.

    Beginner's guides, 5 minute read, November 8, 2026

  3. How to Make Money With an Astro Blog (7 Honest Ways)

    A static Astro site can earn money the same ways a WordPress blog can, and it costs nothing to run. Here are seven ways that work, what each needs, and what to skip.

    Beginner's guides, 9 minute read, November 8, 2026

Try "blog", "deploy" or "EmDash".