Astro + Vercel

Astro sites deployed on Vercel: static-first pages with island hydration, plus on-demand rendering for selected routes through the @astrojs/vercel adapter.

  • AstroAstro
  • TypeScriptTypeScript
  • VercelVercel
Learning curve
Easy
Status
Actively developed
Reviewed
November 2026
Best for
  • Marketing sites and landing pages
  • Documentation sites, for example built with Starlight
  • Blogs and content sites driven by Markdown, MDX or a headless CMS
  • Teams that review content changes on per-pull-request preview URLs
Not ideal for
  • Interactive SaaS dashboard
  • E-commerce storefront

Overview

Astro renders pages to HTML at build time and ships no JavaScript by default; interactive pieces hydrate as islands from React, Svelte, Vue or other components through client:* directives. Vercel builds the project from Git, serves static output from its CDN, and runs routes that opt out of prerendering as Vercel Functions through the @astrojs/vercel adapter. The recipe is a common pick for marketing sites, blogs and documentation that need fast pages and occasional server logic.

What's inside

Astro components are HTML with a frontmatter script block, so anyone who knows HTML, CSS and some JavaScript is productive quickly. Deploying to Vercel needs only the adapter once server routes appear.

  • Astro

    Astro

    Frontend

    Builds the interface people see and use

    Learning: Easy

    Status: Active

  • TypeScript

    TypeScript

    Language

    The language the code is written in

    Learning: Moderate

    Status: Active

  • Vercel

    Vercel

    Infrastructure

    Hosts, deploys or connects the system

    Learning: Easy

    Status: Active

How it works

On every git push Vercel runs astro build: prerendered routes become static HTML on the CDN, while on-demand routes, actions and API endpoints become functions. In the browser only components marked with a client directive load JavaScript.

  1. 1.

    Infrastructure to frontend

    A Git push triggers a Vercel build; every branch and pull request gets its own preview deployment URL.

  2. 2.

    Frontend to frontend

    astro build loads content collections (Markdown, MDX or a CMS through loaders), validates them against Zod schemas, and renders prerendered pages to static HTML.

  3. 3.

    Frontend to infrastructure

    Routes with export const prerender = false, Astro Actions and API endpoints are bundled by @astrojs/vercel into Vercel Functions; static assets go to the CDN.

  4. 4.

    Infrastructure to frontend

    Visitors receive HTML and CSS from the CDN; only islands with client:load, client:idle or client:visible download and hydrate their component JavaScript.

Strengths and drawbacks

Strengths

  • No JavaScript unless asked for

    Pages ship as HTML and CSS unless a component opts into hydration, which keeps content pages fast and Core Web Vitals healthy without performance tuning.

  • Bring any UI framework to an island

    React, Vue, Svelte, Solid and Preact components can all be islands on the same site, so teams reuse existing components without committing the whole site to one framework.

  • Typed content collections

    Content is loaded through collections with Zod schemas, so a missing or misspelled frontmatter field fails the build instead of producing a broken page.

  • Low-ops hosting with previews

    Vercel handles builds, CDN, HTTPS and preview deployments; moving one route to server rendering is a prerender flag change, not new infrastructure.

Drawbacks

  • Not built for app-like interactivity

    Islands are isolated from each other; sharing state needs a small store such as nanostores, and heavily interactive dashboards fit better in a SPA or a full-stack framework.

  • Usage billing and adapter-specific features

    On paid Vercel plans, function invocations, bandwidth and image optimization are billed by usage, and features such as ISR and Vercel's image service are adapter options; moving hosts means switching adapters and re-checking them.

  • Build times grow with content

    Fully static sites rebuild every page on each deploy, so large catalogs or docs sets build slowly; on-demand rendering or ISR shortens builds but adds cache-invalidation questions.

Scores

Editorial ratings out of 10, comparable across every stack in the guide. They are judgement, not benchmarks. How we score

Speed of building
8.0 out of 10, catalog average 7.7

How quickly a team ships features

Ease of learning
8.4 out of 10, catalog average 7.2

Higher means easier to pick up

Scalability
8.2 out of 10, catalog average 7.6

How far it grows before a redesign

Performance
9.0 out of 10, catalog average 7.5

Speed of the running application

Maintainability
7.8 out of 10, catalog average 7.2

How well the codebase ages

Ecosystem
7.4 out of 10, catalog average 8.2

Libraries, hosting, docs and hiring

Flexibility
6.2 out of 10, catalog average 7.4

How many kinds of product it suits

How it scales

Static pages scale with Vercel's CDN without extra work; scaling questions only appear for on-demand routes, where function usage and the APIs or databases behind them become the limits.

Starting outMVP and first users
A fully static site on Vercel's Hobby plan (personal, non-commercial use) or a paid team plan, with content as Markdown in the repository.
GrowingReal traffic, a few engineers
A headless CMS feeding content collections, webhook-triggered rebuilds, and a few on-demand routes for forms, search or newsletter signups.
LargeHeavy traffic or data
Thousands of pages using ISR or on-demand rendering to keep builds short, Vercel image optimization, and middleware for redirects and localization.
EnterpriseMany teams and regions
Several Astro sites sharing a component package in a monorepo, a CMS with editorial workflows and preview deployments, and business logic in dedicated APIs.

Where it fits

Common projects, from best fit to worst.

  • Product documentation

    Starlight or custom Astro layouts give navigation, search and Markdown/MDX docs with fast static delivery and pull-request previews.

    Great fit

  • Marketing site with a headless CMS

    CMS content through collections, mostly static pages, and a few islands for forms or pricing calculators.

    Great fit

  • E-commerce storefront

    Product pages work well statically, but carts, accounts and personalized pricing push more routes into server rendering and client islands.

    Workable

  • Interactive SaaS dashboard

    Shared client state, live updates and authenticated views work against the islands model; a SPA or full-stack framework fits better.

    Poor fit

Alternatives

Similar stacks, and when you would choose them instead.

Sources

Reviewed on November 19, 2026 against the documentation below. Found something out of date? Suggest a correction. Read our methodology.

Stacks that share technologies with Astro + Vercel.