Astro vs Next.js comes down to one question. Is your site mostly pages people read, or an app people use? Astro is built for the first, and Next.js for the second.
We run both sides of that choice. contextbolt.com, the home of ContextBolt, is an Astro site of about 650 pages, and our Context Board app is React. So on October 19, 2026, we built the same page in each and measured what it sends to the browser. The SEO difference turns out to be page weight, not whether Google can read your words.
- Pick Astro for content: blogs, docs, marketing sites, anything people mostly read.
- Pick Next.js for apps: logins, dashboards, live data, lots of moving parts on screen.
- Same page, built twice: Astro 7.4 sent no JavaScript. Next.js 16.4 sent five script files, about 130 KB compressed.
- Google can read both. Both render real HTML on the server. The SEO difference is page weight and the plumbing around it, not whether Google sees your words.
Astro vs Next.js at a glance
| Astro | Next.js | |
|---|---|---|
| Built for | Content sites | Web apps |
| Default JavaScript | None. You opt in per component | React runtime on every page |
| Rendering | HTML at build time, or on the server | HTML at build time, on the server, or rebuilt on a timer |
| UI components | Astro, plus React, Vue, Svelte as islands | React only |
| SEO tags | You write a head component | Built-in metadata API |
| Sitemap | Official add-on | Built-in sitemap.ts file |
| Static redirects | Meta refresh only. Use the host | Not supported. Use the host |
| Made by | The Astro team, now part of Cloudflare | Vercel |
Which one should you pick?
Choose Next.js when the site is an app:
- People log in. Accounts, settings, anything behind a password.
- The screen changes a lot. Dashboards, editors, carts, live data.
- You need the server per request. Personalized pages, server actions, forms that write to a database.
- Huge catalogs that change. Next.js can rebuild a page on a timer instead of rebuilding the whole site.
- Your team already lives in React. That counts for a lot.
Choose Astro when the site is mostly read:
- Blogs, docs and marketing sites. Pages that look the same for everyone. Docs can use Starlight, Astro’s official docs theme, for navigation and search.
- Speed without effort. Zero JavaScript is the default, not a goal you tune toward.
- Content in files. Astro’s content collections turn a folder of Markdown into typed pages. Our blog is a folder of
.mdxfiles, and a post with a missing or malformed field fails the build before it can ship. - You still want React here and there. The official React integration drops a React component into an Astro page as an island. Only that component loads JavaScript.
A shop depends on size. A small catalog fits Astro with a hosted checkout, and a big catalog with accounts and personalized pages fits Next.js.
Many teams use both. Build the marketing site and blog in Astro, where pages are light and rank, and the product in Next.js or React, where people log in, then link between them. That’s our setup. Our Context Board app is React because people sign in and drag things around in it, and we wouldn’t build it in Astro.
We built the same page in both
The test is simple on purpose. One page, a heading and three paragraphs of plain text, with nothing interactive. Anything the browser downloads beyond the HTML is the framework’s own weight. The Astro version is one file. The Next.js version is the smallest App Router site there is, a layout and a page, both server components, built as a static export. Then we counted every script each page loads in a modern browser.
Astro 7.4.1 HTML 371 bytes scripts: 0
Next.js 16.4.2 HTML 5.0 KB scripts: 5 files
about 130 KB compressed, about 446 KB unpacked
plus 3.8 KB of inline page data
To count, we added up every file on the page’s script tags. We left out one more Next.js file, about 110 KB of polyfills, because it is marked noModule and modern browsers skip it. Our own site is on Astro 6, and the test used the current release of each framework.
To be fair to Next.js, that JavaScript isn’t waste. It’s React itself, plus the router that makes clicking between pages feel instant. An app needs all of it and more. On an article, it’s weight the reader pays for and never uses.
A real site widens the gap. A real Next.js site adds its own client components on top of that runtime, while a real Astro site adds only the islands you choose. Our 650-page site has chosen none, so every page still sends no framework JavaScript.
What it means for SEO
Many comparisons say Google struggles with Next.js because it is JavaScript. It doesn’t.
Both send real HTML: Next.js renders pages on the server or at build time, so the words are in the HTML before any script runs. Google reads that directly, and so do AI crawlers that never run JavaScript. Vercel’s December 2024 study found none of the major ones did. A Next.js site only hides content when you fetch it in the browser after the page loads, and you make that choice yourself.
Page weight is the difference: Google calls Core Web Vitals, its loading and responsiveness scores, part of what “our core ranking systems seek to reward,” and it recommends “good Core Web Vitals for success with Search.” Less JavaScript means less work for the phone before the page responds. Astro starts at zero, and Next.js starts at the React runtime and you work down from there.
Next.js has more SEO plumbing built in: It has a metadata API for titles and descriptions, and special sitemap.ts and robots.ts files. Astro needs you to write a head component and add the sitemap integration. Neither is hard, and our Astro SEO setup shows the Astro version.
Watch the sitemap dates: The Next.js sitemap docs set lastModified: new Date() on every URL in their example. Copy that and every page claims it changed today, on every build. Google’s sitemap guide says it only uses lastmod when it is “consistently and verifiably” accurate, so use each page’s real edit date in either framework.
Redirects depend on how you deploy: On a server, Next.js redirects with permanent: true send a 308, which Google treats as permanent, the same as a 301. But the static export docs list redirects, headers, image optimization and timed regeneration as unsupported. Astro’s static build turns redirects into meta refresh pages. Either way, a static site should put its redirects in the host’s file.
Images need a plan in both: Next.js resizes images with next/image, but on a static export the default loader is on that unsupported list, so you need another image service. Astro’s Image component resizes images at build time, so a static Astro site gets sized, lighter images with no server. Images are often the largest thing on a page, so it affects loading scores.
Who owns each one
Next.js is made by Vercel. It runs best on Vercel, and it also runs on your own Node server and on other hosts, Cloudflare included.
Astro changed hands this year. On January 16, 2026, Cloudflare announced that the team behind Astro was joining it. Astro’s own announcement says the framework stays open source and keeps supporting other hosts. Astro still deploys to Netlify, Vercel or any static host, and ours runs on Cloudflare Pages. Neither framework locks you in, but each works smoothest on its owner’s platform.
Moving a Next.js site to Astro
If your Next.js site turned out to be mostly content, the move is smaller than it looks. Most pieces have a direct match.
| In Next.js | In Astro |
|---|---|
| Pages in the app folder | Pages in src/pages, or a content collection |
| React components | Astro components, or keep them as React islands |
| The metadata API | A head component |
| app/sitemap.ts | The official sitemap integration |
| next/image | The Image component from astro:assets |
| Redirects in next.config | Your host’s redirect file |
Watch the trailing slash: Next.js removes it by default. Its trailingSlash docs say /about/ redirects to /about. Astro’s default build writes /about/index.html, which Cloudflare Pages serves at /about/. Move without thinking and every URL on the site changes. Set build.format: 'file' in Astro to keep /about, the same fix we use in Framer to Astro.
Keep React where it earns its place: A pricing calculator or a signup form can stay a React component inside an Astro page, loading only its own script, while everything around it becomes plain HTML.
Snapshot rankings first: Save what ranks before you change a line, keep every URL or redirect it with a 301, and compare after four weeks. Framer to Astro walks through the SEO steps, which are the same whichever framework you leave, and Astro vs WordPress covers the other common move.
Checking rankings from your editor
Whichever you pick, the site will probably be built in an AI coding tool. ContextBolt SEO is the SEO toolkit we build for that. It runs inside Claude Code over MCP and brings keyword data, the results page for any search, page audits and your own Search Console into the window where the code lives. Search Console calls are free, keyword and results-page checks cost one credit each, and it is $35 a month after a 7-day free trial with 100 credits.