Astro and Next.js on Netlify, with a preview per change
Netlify builds your site from Git, serves it from a global CDN and gives every pull request its own preview URL. It is a common home for Astro sites and supports Next.js through an open-source adapter.
How we set it up
The method depends on where your site is built. Here is what we use for Netlify on each platform.
Framer
Framer hosts and serves Framer sites itself, with its own CDN, SSL and staging. Netlify would only come in for something separate, like a docs site on a subdomain, while the main domain points to Framer.
Framer development Not a fitWebflow
Webflow sites are hosted by Webflow. Netlify only plays a role if you move to a code-built site or run a separate project, such as a docs site or tool, alongside the Webflow marketing site on another subdomain.
Webflow development Official adapterAstro
Static Astro sites deploy to Netlify from Git with no extra configuration. When some routes render on demand, we add Astro’s Netlify adapter, which turns them into Netlify Functions or Edge Functions. Redirects from the old site go in a redirects file that is versioned with the code.
Astro development OpenNext adapterNext.js
Netlify runs Next.js with zero configuration through its open-source OpenNext adapter, which supports the App Router, Server Actions, ISR and middleware, and maps next/image to Netlify’s Image CDN. Netlify recommends not pinning the adapter version, so we test previews after major Next.js upgrades.
Next.js developmentWhat teams use it for
Previews for review
Each pull request deploys to its own URL, so content and design changes are approved on a real page.
Redirects on migration
Old URLs map to new ones in a versioned redirects file, so rankings carry over.
Simple forms
Netlify Forms collects submissions from static pages without a separate backend.
What to watch out for
Environment variables and build secrets must be scoped per context, so preview builds do not use production keys.
Deploy previews are public by default. We add password protection for unreleased work; Netlify already marks them noindex.
Server-rendered routes and functions add cold starts. Pages that do not change per visitor should stay static.
Questions about Netlify
Does Astro need an adapter on Netlify?
Can Netlify host our Framer or Webflow site?
Are Netlify deploy previews public?
Netlify, Vercel or Cloudflare for Astro?
Who owns the Netlify account?
Thomas OldenburgerFounder, design and build leadStill deciding? A 30-minute call answers most of it.
Related integrations and services
Vercel
Hosting from the makers of Next.js, with preview deployments for every branch and pull request.
OpenCloudflare
DNS, CDN, security and hosting at the edge, from domain records to full-stack apps.
OpenGitHub
Where the code for Astro and Next.js sites lives, is reviewed and gets deployed from.
OpenAstro development
Astro builds hosted with previews and versioned redirects.
OpenStatic site generator
Glossary definition.
Open