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:
- Create a free Netlify account and open Netlify Drop.
- Drag your
distfolder onto the page. - 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
- Install a theme for a finished design
- Add an integration for extra features
- Deploy to Cloudflare Workers, the host we use
- Choose a permanent host when you’re ready
Star lit. See your progress