Icon

Engineering

Icon

Astro vs Next.js for Marketing Sites: When to Use Each

·

By Chandresh Patidar

Kraftbase thumbnail: Astro vs Next.js for Marketing Sites: When to Use Each

Astro for pages people read, Next.js for pages people use.

One of our clients, a B2B company, needed a marketing site that is mostly reading: 24 long articles, a large FAQ, landing pages for each audience and an events list. We built it on Next.js, as we had every site before it.

It works, and it taught us where Astro would have fit better. This post covers what the site had to do, what we found once it was live, the decisions we'd make now and why, and how we'd run Astro and Next.js together. Everything we measured, we say how. Everything about Astro is our reasoning, because we haven't shipped an Astro site yet.

A laptop showing code on a white desk

What we needed

  • Pages people read. Long articles and a big FAQ, with almost nothing on them that needs JavaScript.

  • Content the client can switch on and off from a CMS, without a developer.

  • A few pieces of product logic. One page lets users sign in and delete their account through the product’s API.

  • Fast pages on phones and slow connections.

  • Simple hosting and deploys for a small team.

Where we started

We built the site on Next.js with Sanity as the CMS, deployed on Vercel. Next.js was our default, and it handled every page the site needed.

Three things showed up once it was live:

  • Too much JavaScript. When we measured it on 5 November 2026, the home page loaded 557 KB of JavaScript (gzipped), most of it doing nothing for a reader. The biggest file even held the text of the FAQ answers, on a page that doesn’t show the FAQ. The likely cause is a shared import file that pulls the FAQ code in with everything else. We haven’t confirmed it with a bundle analyzer yet.

  • A home page that went stale. It shows upcoming events from the CMS, but it was built once at deploy time. When we checked, the live home page was about six and a half days old, so new events only appeared after a redeploy.

  • No draft preview. Editors publish, then check the live site.

None of this is Next.js being slow. It’s Next.js making those mistakes easy on a site that is mostly reading.

Astro vs Next.js: the difference that matters

Next.js builds pages with React, and the browser gets React’s JavaScript on every page, so every page is ready to be interactive. Astro builds pages to plain HTML and sends no JavaScript unless you mark a part of the page as interactive, like a pricing toggle or a form, and then only that part loads it.

In Next.js, interactivity is the default and you work to keep it small. In Astro, you add it only where you need it. On a site people mostly read, that difference matters more than any benchmark.

The decisions

Astro for the next site that’s mostly reading

The site has 51 interactive components, and each one is a chance for extra code to reach the browser. On Astro, nothing reaches the browser unless we put it there, so a mistake like the FAQ text in the home page bundle can’t happen quietly. Our next site that’s mostly content will be Astro.

The trade-off: a second way of working for a team that also builds React apps. Astro can run React components, so it’s a smaller step than it sounds.

Next.js where the site is part of the product

If the pricing table, signup form and design system already exist as React components in a Next.js app, reusing them is an import. Rebuilding them for Astro is a project. The same goes for pages that need login or change for each visitor.

The delete-account page is a small example. Next.js made it easy to load the sign-in code on that one page only, so the rest of the site stays light. Astro can do it too, but we’d set it up ourselves.

Every page that reads the CMS gets a refresh rule

The stale home page taught us this one. Any page that pulls from the CMS gets a refresh time or a publish webhook from day one. On Astro this matters even more, because a static site works that way on every page: the CMS has to trigger a rebuild each time an editor publishes, and builds have to stay fast. So “our content changes often” isn’t a reason to pick Astro. “Our content is mostly read” is.

Plan preview before editors need it

No preview is fine while developers write most of the content, and it isn’t fine for a marketing team publishing every day. On Next.js we’d add the CMS’s preview tool. On Astro, preview needs more planning, because a static site has nothing to render a draft with: you add one page that renders on the server, or run a separate preview site.

How we’d run both

We haven’t run this split in production yet. This is the plan, not something we’ve shipped.

One routing rule sends /, /pricing and /blog to the Astro marketing site and /app and /login to the Next.js app, with a shared design package and the same analytics on both

One domain, two frameworks: a routing rule sends app paths to Next.js and everything else to Astro.

  1. Routing. Your host’s rewrites or a CDN rule send /app and /login to the app and everything else to the marketing site. A subdomain like app.example.com works too.

  2. Shared design. Colors, fonts and shared components live in one package that both sites install.

  3. Login. The marketing site stays logged out. Its “Log in” button is just a link into the app.

  4. Analytics. The same setup on both, so visitors aren’t lost at signup.

  5. Deploys. Two sites, two deploys, and one person who owns the routing.

What it’s like to run

The client’s site runs on Vercel with no extra setup, and every push to GitHub deploys. Before each commit, a check runs lint and a full build, which takes about 29 seconds. The site uses Microsoft Clarity, Google Analytics and the LinkedIn Insight Tag.

On Astro, we’d plan for a static site on a CDN, a rebuild every time the CMS publishes, and the same analytics.

What we learned

  • The default matters more than the framework. Next.js starts interactive. Astro starts as plain HTML. Pick the one whose default matches what most pages do.

  • Measure the home page before launch. A bundle analyzer is the fastest way to catch a shared import pulling code onto pages that never use it.

  • Any page built only at deploy goes stale quietly. Nobody notices until an event is missing.

  • Fix images, fonts and trackers first. They slow a page down on either framework.

When this design fits

Astro fits a site people mostly read: blogs, guides, docs and landing pages, especially when nobody logs in and pages don’t change per visitor. Next.js fits a site that shares login, components or live data with a React app. If you have both, run both on one domain. If the site doesn’t need a framework at all, we’ve compared Framer vs Webflow for B2B SaaS and written up a Webflow to Framer migration for SaaS.

Related reading

Whatever you build on, the pages matter more than the framework. Start with our SaaS website structure and the SaaS homepage redesign checklist. For the app side of a split setup, see how we built a scalable notification system.

FAQ

1. Is Astro faster than Next.js?

For content pages, usually, because Astro sends no JavaScript unless a component needs it, while Next.js sends React's JavaScript on every page. The gap shows most on phones and slow connections. Heavy images, fonts and tracking scripts slow a page down on either framework, so fix those first.

2. Is Astro better for SEO?

Not by itself. Both send search engines fully built HTML, and both let you control titles, meta descriptions, canonical tags and structured data. Astro's lighter pages can help page speed a little. Content, internal links and how fast the main content shows up move rankings more.

3. Can Astro and Next.js share components?

Yes, if they're React components. Put them in a shared package that both projects install, along with your design tokens. Anything that uses features only Next.js has, like its image or link components, needs a small wrapper on the Astro side. Keep shared components free of data fetching.

4. Can I use React components in Astro?

Yes. Add Astro's React integration and import the component. By default Astro renders it to plain HTML with no JavaScript. Add a client directive only when the component has to be interactive in the browser, like a pricing toggle or a form, and only that component loads React.

5. Do I need Vercel for Next.js?

No. Next.js runs on any server that runs Node, including Docker on your own host, and on other platforms that support it. We use Vercel for this client because it needs no setup and deploys on every push. Check which features your host supports before you move.

6. Can I run Astro and Next.js on one domain?

Yes. Put a routing rule in front, such as your host's rewrites or a CDN rule, that sends paths like /app and /login to Next.js and everything else to Astro. Decide early who owns that routing, use the same analytics on both, and test the handoff from marketing page to signup.

Engineering

Picking a stack for your marketing site?

Tell us what the site has to do and who edits it. We'll tell you which way we'd build it and why.

Astro for pages people read, Next.js for pages people use.

One of our clients, a B2B company, needed a marketing site that is mostly reading: 24 long articles, a large FAQ, landing pages for each audience and an events list. We built it on Next.js, as we had every site before it.

It works, and it taught us where Astro would have fit better. This post covers what the site had to do, what we found once it was live, the decisions we'd make now and why, and how we'd run Astro and Next.js together. Everything we measured, we say how. Everything about Astro is our reasoning, because we haven't shipped an Astro site yet.

A laptop showing code on a white desk

What we needed

  • Pages people read. Long articles and a big FAQ, with almost nothing on them that needs JavaScript.

  • Content the client can switch on and off from a CMS, without a developer.

  • A few pieces of product logic. One page lets users sign in and delete their account through the product’s API.

  • Fast pages on phones and slow connections.

  • Simple hosting and deploys for a small team.

Where we started

We built the site on Next.js with Sanity as the CMS, deployed on Vercel. Next.js was our default, and it handled every page the site needed.

Three things showed up once it was live:

  • Too much JavaScript. When we measured it on 5 November 2026, the home page loaded 557 KB of JavaScript (gzipped), most of it doing nothing for a reader. The biggest file even held the text of the FAQ answers, on a page that doesn’t show the FAQ. The likely cause is a shared import file that pulls the FAQ code in with everything else. We haven’t confirmed it with a bundle analyzer yet.

  • A home page that went stale. It shows upcoming events from the CMS, but it was built once at deploy time. When we checked, the live home page was about six and a half days old, so new events only appeared after a redeploy.

  • No draft preview. Editors publish, then check the live site.

None of this is Next.js being slow. It’s Next.js making those mistakes easy on a site that is mostly reading.

Astro vs Next.js: the difference that matters

Next.js builds pages with React, and the browser gets React’s JavaScript on every page, so every page is ready to be interactive. Astro builds pages to plain HTML and sends no JavaScript unless you mark a part of the page as interactive, like a pricing toggle or a form, and then only that part loads it.

In Next.js, interactivity is the default and you work to keep it small. In Astro, you add it only where you need it. On a site people mostly read, that difference matters more than any benchmark.

The decisions

Astro for the next site that’s mostly reading

The site has 51 interactive components, and each one is a chance for extra code to reach the browser. On Astro, nothing reaches the browser unless we put it there, so a mistake like the FAQ text in the home page bundle can’t happen quietly. Our next site that’s mostly content will be Astro.

The trade-off: a second way of working for a team that also builds React apps. Astro can run React components, so it’s a smaller step than it sounds.

Next.js where the site is part of the product

If the pricing table, signup form and design system already exist as React components in a Next.js app, reusing them is an import. Rebuilding them for Astro is a project. The same goes for pages that need login or change for each visitor.

The delete-account page is a small example. Next.js made it easy to load the sign-in code on that one page only, so the rest of the site stays light. Astro can do it too, but we’d set it up ourselves.

Every page that reads the CMS gets a refresh rule

The stale home page taught us this one. Any page that pulls from the CMS gets a refresh time or a publish webhook from day one. On Astro this matters even more, because a static site works that way on every page: the CMS has to trigger a rebuild each time an editor publishes, and builds have to stay fast. So “our content changes often” isn’t a reason to pick Astro. “Our content is mostly read” is.

Plan preview before editors need it

No preview is fine while developers write most of the content, and it isn’t fine for a marketing team publishing every day. On Next.js we’d add the CMS’s preview tool. On Astro, preview needs more planning, because a static site has nothing to render a draft with: you add one page that renders on the server, or run a separate preview site.

How we’d run both

We haven’t run this split in production yet. This is the plan, not something we’ve shipped.

One routing rule sends /, /pricing and /blog to the Astro marketing site and /app and /login to the Next.js app, with a shared design package and the same analytics on both

One domain, two frameworks: a routing rule sends app paths to Next.js and everything else to Astro.

  1. Routing. Your host’s rewrites or a CDN rule send /app and /login to the app and everything else to the marketing site. A subdomain like app.example.com works too.

  2. Shared design. Colors, fonts and shared components live in one package that both sites install.

  3. Login. The marketing site stays logged out. Its “Log in” button is just a link into the app.

  4. Analytics. The same setup on both, so visitors aren’t lost at signup.

  5. Deploys. Two sites, two deploys, and one person who owns the routing.

What it’s like to run

The client’s site runs on Vercel with no extra setup, and every push to GitHub deploys. Before each commit, a check runs lint and a full build, which takes about 29 seconds. The site uses Microsoft Clarity, Google Analytics and the LinkedIn Insight Tag.

On Astro, we’d plan for a static site on a CDN, a rebuild every time the CMS publishes, and the same analytics.

What we learned

  • The default matters more than the framework. Next.js starts interactive. Astro starts as plain HTML. Pick the one whose default matches what most pages do.

  • Measure the home page before launch. A bundle analyzer is the fastest way to catch a shared import pulling code onto pages that never use it.

  • Any page built only at deploy goes stale quietly. Nobody notices until an event is missing.

  • Fix images, fonts and trackers first. They slow a page down on either framework.

When this design fits

Astro fits a site people mostly read: blogs, guides, docs and landing pages, especially when nobody logs in and pages don’t change per visitor. Next.js fits a site that shares login, components or live data with a React app. If you have both, run both on one domain. If the site doesn’t need a framework at all, we’ve compared Framer vs Webflow for B2B SaaS and written up a Webflow to Framer migration for SaaS.

Related reading

Whatever you build on, the pages matter more than the framework. Start with our SaaS website structure and the SaaS homepage redesign checklist. For the app side of a split setup, see how we built a scalable notification system.

FAQ

1. Is Astro faster than Next.js?

For content pages, usually, because Astro sends no JavaScript unless a component needs it, while Next.js sends React's JavaScript on every page. The gap shows most on phones and slow connections. Heavy images, fonts and tracking scripts slow a page down on either framework, so fix those first.

2. Is Astro better for SEO?

Not by itself. Both send search engines fully built HTML, and both let you control titles, meta descriptions, canonical tags and structured data. Astro's lighter pages can help page speed a little. Content, internal links and how fast the main content shows up move rankings more.

3. Can Astro and Next.js share components?

Yes, if they're React components. Put them in a shared package that both projects install, along with your design tokens. Anything that uses features only Next.js has, like its image or link components, needs a small wrapper on the Astro side. Keep shared components free of data fetching.

4. Can I use React components in Astro?

Yes. Add Astro's React integration and import the component. By default Astro renders it to plain HTML with no JavaScript. Add a client directive only when the component has to be interactive in the browser, like a pricing toggle or a form, and only that component loads React.

5. Do I need Vercel for Next.js?

No. Next.js runs on any server that runs Node, including Docker on your own host, and on other platforms that support it. We use Vercel for this client because it needs no setup and deploys on every push. Check which features your host supports before you move.

6. Can I run Astro and Next.js on one domain?

Yes. Put a routing rule in front, such as your host's rewrites or a CDN rule, that sends paths like /app and /login to Next.js and everything else to Astro. Decide early who owns that routing, use the same analytics on both, and test the handoff from marketing page to signup.

Engineering

Picking a stack for your marketing site?

Tell us what the site has to do and who edits it. We'll tell you which way we'd build it and why.