🔥 All-Access Pass — $199 USD (Regular $499) · Unlock all 2,836 Astro themes ➔
komal.nakrani
Get All-Access Pass ($199)
ThemesCategoriesDocsBlogTips & TricksPricingGet All-Access Pass ($199)
Deployment••By Komal Nakrani

Free Astro Hosting: Where to Deploy an Astro Site

Free Astro hosting compared: Cloudflare, Netlify, Vercel, GitHub Pages, GitLab Pages, Render and Firebase, with build settings, limits to check and SSR support.

#Astro#Free Astro Hosting#Deployment#Static Hosting

Free Astro hosting is easy to find because a static Astro build is just a folder of HTML, CSS and assets. Cloudflare (Pages or Workers static assets), Netlify, Vercel, GitHub Pages, GitLab Pages, Render and Firebase Hosting all serve the dist/ folder on free plans with HTTPS, a CDN and deploys from Git. The differences are in build minutes, bandwidth policy, commercial-use terms and whether on-demand rendering is available without paying.

This guide compares the free options for Astro, gives the build settings for each, and lists what to check before you pick one.

Key Takeaways

  • Any static host works for a default Astro site: build command npm run build, output folder dist.
  • Cloudflare, Netlify and Vercel also run on-demand (SSR) routes on their free plans through an official adapter.
  • Vercel’s free Hobby plan is for personal, non-commercial use; client and business sites need a paid plan.
  • GitHub Pages is free for public repositories and needs a GitHub Actions workflow for Astro.
  • Free-tier limits change. Check each provider’s current pricing page before launching a busy site.

Free Astro hosting compared

Host Static Astro On-demand routes (free) Adapter Deploys from Notable terms
Cloudflare Pages / Workers Yes Yes @astrojs/cloudflare GitHub, GitLab, CLI Generous static bandwidth; build count limits
Netlify Yes Yes @astrojs/netlify GitHub, GitLab, Bitbucket, CLI Usage-based free allowance
Vercel Yes Yes @astrojs/vercel GitHub, GitLab, Bitbucket, CLI Hobby plan is non-commercial
GitHub Pages Yes No None GitHub Actions Public repos on free accounts; soft usage limits
GitLab Pages Yes No None GitLab CI CI minutes count toward your quota
Render (static sites) Yes Paid web services @astrojs/node for SSR GitHub, GitLab Free static sites
Firebase Hosting Yes Via Cloud Functions (billing required) Community CLI, GitHub Actions Free tier storage and transfer caps

The specific numbers (bandwidth, build minutes, requests) change regularly, so the table lists policies rather than figures. A personal blog or portfolio fits comfortably in any of them.

Cloudflare

Cloudflare is the most common free choice for static Astro sites because static asset requests are served from its network with generous free usage. You can deploy with Cloudflare Pages (connect a repository, set the build) or Workers with static assets, which Cloudflare now promotes for new projects.

Build settings:

Setting Value
Framework preset Astro
Build command npm run build
Output directory dist
Node version 22.23.4 or newer (set NODE_VERSION or add .nvmrc)

For on-demand routes, add the adapter:

# terminal
npx astro add cloudflare

Our step-by-step Cloudflare Pages docs and the Cloudflare deploy guide cover custom domains and environment variables.

Netlify

Netlify detects Astro automatically and fills in the build command and publish directory. Its free plan includes form handling (useful for contact forms on a static site), deploy previews for every pull request, and serverless functions.

# netlify.toml
[build]
  command = "npm run build"
  publish = "dist"

[build.environment]
  NODE_VERSION = "22"

For SSR, run npx astro add netlify. Netlify’s free plan has moved to a usage-based allowance, so check what a month of your traffic and builds would consume. See deploying Astro to Netlify.

Vercel

Vercel also detects Astro with zero config and supports static output, on-demand rendering with @astrojs/vercel, image optimization and preview deployments.

The important limit is the licence: the free Hobby plan is for personal, non-commercial projects. A freelancer’s client site, a company blog or a store should be on a paid plan or another host. For personal projects, it’s one of the smoothest options.

GitHub Pages

GitHub Pages is free for public repositories and suits documentation, open-source project sites and personal pages. Astro builds through the official action:

# .github/workflows/deploy.yml
name: Deploy to GitHub Pages

on:
  push:
    branches: [main]
  workflow_dispatch:

permissions:
  contents: read
  pages: write
  id-token: write

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: withastro/action@v3
  deploy:
    needs: build
    runs-on: ubuntu-latest
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    steps:
      - id: deployment
        uses: actions/deploy-pages@v4

Set Settings > Pages > Source to GitHub Actions. If the site lives at username.github.io/repo-name/, set site and base in astro.config.mjs:

// astro.config.mjs
import { defineConfig } from 'astro/config';

export default defineConfig({
  site: 'https://username.github.io',
  base: '/repo-name',
});

There’s no server, so on-demand routes, server islands and actions won’t work. Check the action’s README for its current major version. Full steps are in deploying Astro to GitHub Pages.

GitLab Pages, Render and Firebase

GitLab Pages works like GitHub Pages with a .gitlab-ci.yml job that runs npm run build and publishes the output. GitLab expects a public folder by default, so either set outDir: 'public' (and move your static files to another publicDir) or copy dist to public in the job.

Render offers free static sites with a build command and publish directory, plus pull request previews. On-demand Astro with @astrojs/node runs as a web service, which is a separate (paid for always-on) product.

Firebase Hosting serves static files on its free tier and is convenient if the rest of your project already uses Firebase. Set "public": "dist" in firebase.json.

What to check before choosing a free Astro host

  1. Commercial use. Is a business or client site allowed on the free plan?
  2. Bandwidth and requests. What happens if a post goes viral: throttling, a bill, or a paused site?
  3. Build minutes and build count. Frequent content updates on a large site can use these up.
  4. On-demand rendering. Do you need it now, or later? Moving hosts later means changing the adapter.
  5. Node.js version. Astro 7 requires Node.js 22.23.4 or newer. Make sure the build image provides it.
  6. Custom domains and HTTPS. All the hosts above include free certificates; check the DNS steps in our custom domain tip.
  7. Headers and redirects. Cloudflare and Netlify read _headers and _redirects files from public/; Vercel uses vercel.json.

Staying portable

Keep your site easy to move between hosts:

  • Prefer static output. A static dist/ folder deploys to any host unchanged.
  • Use Astro’s redirects config instead of a host-specific redirects file where you can.
  • Keep secrets in environment variables defined with Astro’s env schema, not in host-specific code.
  • Add the adapter only for routes that truly need a server.

Our Astro deployment guide compares paid tiers and edge features if you outgrow free hosting.

Every Komal theme builds to static files with no adapter, so it deploys to any host in this list without changes; you can browse Astro themes or follow the static hosting docs. The official Astro deploy guides list more hosts.

FAQ

Where can I host an Astro site for free?

Cloudflare Pages or Workers, Netlify, Vercel (personal projects), GitHub Pages, GitLab Pages, Render and Firebase Hosting all host static Astro sites for free. Use npm run build as the build command and dist as the output folder.

Is Cloudflare Pages free for Astro?

Yes. Cloudflare’s free plan serves static Astro sites with HTTPS, a global CDN and Git deploys, and it can run on-demand routes with the @astrojs/cloudflare adapter. Build counts and function requests have free limits.

Can I host an Astro SSR site for free?

Yes, within free usage limits, on Cloudflare, Netlify and Vercel (non-commercial on Vercel). Install the matching adapter with npx astro add. GitHub Pages and GitLab Pages only serve static files.

Is Vercel free for commercial Astro sites?

No. Vercel’s Hobby plan is limited to personal, non-commercial use. Commercial sites, including client work, need a paid Vercel plan or a different host.

Does GitHub Pages support Astro?

Yes, for static output. Use the official withastro/action in a GitHub Actions workflow, set the Pages source to GitHub Actions, and set site and base if the site is served from a repository subpath.