The short answer
Use Astro when the site is mostly content: company pages, services, case studies, a blog. Use Next.js when the site is mostly an application: logins, dashboards, a customer portal, a checkout with live stock and prices.
Both are good. They just start from opposite assumptions. Astro assumes a page is a document and lets you opt into interactivity. Next.js assumes a page is part of a React app and lets you opt parts of it out.
How they render pages
Next.js renders React components on the server (React Server Components in the App Router). Anything marked as a client component also ships its JavaScript to the browser so React can take over the page. Navigation between pages happens inside the app.
Astro renders components to HTML and stops there unless you ask for more. Need one interactive piece? Add a directive and only that piece hydrates. You can even write that piece in React.
---
import Hero from '../components/Hero.astro'; // HTML only
import QuoteForm from '../components/QuoteForm.jsx'; // React
---
<Hero />
<!-- JavaScript for the form loads when it scrolls into view -->
<QuoteForm client:visible />The difference in the browser is the default. On a marketing page, Astro ships close to zero JavaScript unless you add it. A Next.js page always carries the React runtime, even on pages that are mostly text.
Side by side
| Factor | Astro | Next.js |
|---|---|---|
| Built for | Content sites | Web applications |
| JavaScript by default | None, opt in per component | React runtime plus client components |
| UI library | Any (React, Vue, Svelte) or none | React |
| Data and auth | Server endpoints, middleware, actions | Mature patterns for apps, auth, caching |
| Hosting | Static, Node, edge, most hosts | Best on Vercel; self-hosting needs more setup |
| Backed by | Cloudflare (since January 2026) | Vercel |
Hosting and lock-in
Astro output is static files or a small server, so it runs almost anywhere: a CDN, a VPS, Cloudflare, Netlify, Vercel.
Next.js also runs on your own Node server, but some features are designed around Vercel's platform. Projects like OpenNext exist to make Next.js behave well on AWS and Cloudflare. That is fine for a product team; for a marketing site it is extra work for little gain.
Security has two sides
More moving parts on the server means more to patch. In March 2025, CVE-2025-29927 let attackers skip Next.js middleware with a single request header, which mattered for any site that used middleware for authentication. Vercel fixed it quickly, but self-hosted sites had to update themselves.
Astro has had its own advisories too. The point is not that one is safe. It is that a content site built mostly from static HTML has less code running per request, so fewer chances for a bug to matter.
9.1
CVSS score of CVE-2025-29927, the Next.js middleware bypass fixed in versions 15.2.3 and 14.2.25.
Source: NIST NVD
Why we moved our own site
Our previous site ran on Next.js with Strapi. In October 2026 we rebuilt it on Astro with EmDash as the CMS. Nothing was wrong with Next.js. We were paying for an app framework to serve what is, honestly, a set of documents with a contact form.
The rebuild kept the design almost unchanged. What changed was the maintenance: fewer packages, less JavaScript on every page, and a CMS editors can use without asking us.
How to choose
- Mostly pages people read? Astro.
- Mostly screens people log into? Next.js.
- Both? Split them: an Astro marketing site at the main domain, a Next.js app at app.yourdomain.com. Many SaaS companies do exactly this.
- Team already writes React? Either works. Astro accepts React components, so the skills carry over.
Frequently asked questions
- Is Astro faster than Next.js?
- For content pages, usually yes, because Astro sends little or no JavaScript by default while Next.js always ships the React runtime. For interactive apps the gap closes, and Next.js offers more built-in app features.
- Can I use React components in Astro?
- Yes. The official React integration lets you use React components inside Astro pages and choose when each one hydrates, for example on load or when it scrolls into view.
- Do I need Vercel to run Next.js?
- No. Next.js can run on your own Node server or other platforms, and projects such as OpenNext help with AWS and Cloudflare. Some features are simplest on Vercel, so self-hosting takes more setup.
- Which is better for SEO, Astro or Next.js?
- Both render HTML on the server, so search engines can read either. Astro makes it easier to keep pages light, which helps Core Web Vitals on content-heavy sites.





