Free Astro tutorials for complete beginners.

Beginner's Guide to Astro

Lesson 7 of 7, about 20 minutes

Put your site online

Build your finished site, publish it for free, and get a real address you can share.

Tested on Astro 7.4

Until now, your site has only existed on your computer. Now you’ll build it and put it on the internet.

Build your site

Stop the dev server, then run:

npm run build

Astro creates a folder called dist holding your finished website. It’s plain HTML and CSS, which any host can serve.

Check it first by running:

npm run preview

Publish it

The quickest way, with no Git needed, is Netlify Drop:

  1. Create a free Netlify account and open Netlify Drop.
  2. Drag your dist folder onto the page.
  3. Wait a few seconds, and Netlify gives you a live address.

Open it on your phone. That’s your website, on the internet.

What you’ve done

You’ve built a website and published it. That’s the whole journey, and every Astro site follows it.

Where to go next

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