Host your Astro site at your own address

A static Astro build is a dist folder of HTML and assets. Drop it in, choose an address, and it's live over HTTPS in seconds.

You can host:
index.html/assetsfolder.zip

Free to use, live at your-name.99helpers.site in about ten seconds.

Why publishing is the slow part

Astro ships almost no JavaScript and renders to plain HTML, which makes it about as portable as a site gets. If you haven't added a server adapter, your build is a folder that any static host can serve — including this one, without a project, a Git connection or a deployment configuration.

What a Astro build gives you

  • A dist folder with each route rendered as HTML
  • Hashed CSS and JavaScript bundles under _astro/
  • Optimized images and other assets from your public folder
  • Islands that hydrate in the browser, exactly as built

Build it, then upload it

Build command
npm run build
Folder to upload
dist/
Check base in astro.config.mjs
Leave base unset (or '/'). A project sub-path would prefix every built asset URL with a folder that doesn't exist at your address.

Platform-shaped hosting for a folder of files

A static build has no runtime needs, yet the default path is still a hosting account, a repository connection and a build that runs remotely.

base trips up project sites

Set base for a sub-path deployment and every asset URL in the build carries it. Publish elsewhere and the page loads without styles.

Sharing a preview is a chore

npm run preview only runs on your machine. A client or a teammate needs a URL, not a checkout.

Publishing a Astro site

  1. 1

    Build with the static output

    Run npm run build with Astro's default static output (no server adapter). Astro writes every page to dist as HTML.

  2. 2

    Leave base as the root

    In astro.config.mjs, leave base unset or set it to '/'. Your site gets the root of its own address, so nothing needs prefixing.

  3. 3

    Drop dist in and publish

    Drag the dist folder (or a zip of its contents) into the box above, choose a name, and the site is live over HTTPS straight away.

Worth knowing

  • Astro's default build makes folder URLs — /blog/post/index.html — which are served as pages, with or without the trailing slash.
  • An src/pages/404.astro becomes 404.html in the build and is used automatically for missing pages.
  • Client-side islands, view transitions and prefetching all work: they're browser features, and the files are served exactly as built.
  • Anything needing a server — SSR routes, Astro Actions, on-demand endpoints — needs a platform that runs code. Use the static output here.
  • Content Collections are resolved at build time, so a big Markdown site turns into plain HTML with no runtime dependency.

Questions

Does SSR work?
No. Server-rendered Astro needs a running Node or edge environment. Build with the static output and everything that renders at build time works here.
Which folder do I upload?
dist, or a zip of what's inside it, with index.html at the top level.
Do the _astro asset files work?
Yes. They're ordinary files with hashed names and are served as uploaded, which is also why a new build can safely replace the old one.
What about image optimization?
Astro's build-time image processing writes the optimized files into dist, so they're included in the upload and served normally.
Can I publish straight from my build script?
Yes, through the REST API with a token, so a post-build step can push the new dist to the same address.

Publish the Astro build you already have

Drop the folder in at the top of this page and see the link for yourself. You only make an account once it's ready to go live.

Every site gets its own address on 99helpers.site — see static site hosting for every generator, how website hosting works here or free file hosting for any file type.