Astro Hosting
Astro builds fast sites. Host them just as fast.
Astro’s default static output is a perfect match for StaticHero. Build, drop the `dist` folder, done — islands, content collections and all.
- Build command
- npm run build
- Upload folder
- dist/
- SPA routing
- Not needed
- Free plan
- Yes
In short
Astro sites using the default static output can be hosted on StaticHero by running astro build and uploading the dist folder. Clean URLs, nested routes, content collections, image optimisation at build time and client islands all work. On-demand rendering (output: 'server' or adapters) requires a server and isn’t supported.
Updated
How to deploy Astro to StaticHero
- 01
Build your project
Run
npm run buildin your project folder. - 02
Find the
dist/folderThat folder contains plain HTML, CSS and JavaScript — the only thing your visitors need.
- 03
Drag it onto StaticHero
Drop the folder (or a ZIP of it) into your site in the dashboard.
No build servers
You build where you already build; we publish in seconds. No queue, no build minutes.
Instant rollback
Every upload is a version. Restore any previous build with one click.
Forms & analytics
Add a contact form and visitor analytics without a backend or extra scripts.
Custom domain + HTTPS
Connect your domain with one DNS record; certificates are automatic.
Configuration
Set your production URL so Astro generates correct canonical URLs and sitemaps:
import { defineConfig } from "astro/config";
import sitemap from "@astrojs/sitemap";
export default defineConfig({
site: "https://yourname.statichero.site",
output: "static",
integrations: [sitemap()],
});Forms in Astro
Astro’s static output has no server endpoints, so use a regular form posting to StaticHero:
<form action="/_forms/contact" method="POST">
<input name="email" type="email" required />
<textarea name="message"></textarea>
<button>Send</button>
</form>Why Astro and StaticHero fit together
Astro ships zero JavaScript by default and pre-renders everything to HTML. Combined with StaticHero’s automatic HTTPS, caching headers for hashed assets and built-in analytics, you get excellent Core Web Vitals without configuring a CDN.
Does Starlight (Astro docs) work?
+
Yes. Starlight builds to static files — upload dist like any Astro site.
Can I use Astro’s server islands?
+
Server islands and on-demand routes need a server adapter, which StaticHero doesn’t run. Static pages with client islands work.
Do I need an adapter?
+
No. The default static output needs no adapter.
Your site could be live in the next minute.
One site free, forever. No credit card, no setup, no servers.