Astro vs Next.js for a marketing site
Astro builds pages. Next.js is a React framework for applications. Those are different jobs, and I build in both.
I build in both, so I have no reason to push you toward either. The honest version of this comparison is short: for most marketing sites the framework does not matter to the people using the site. When it does matter, it is because someone is describing an application and calling it a website.
What each one is for
Astro builds pages. You write components, and the build turns them into HTML files that a CDN serves. JavaScript reaches the browser only for the parts that need it, a menu or a calculator, and a page with none ships none. That is the right shape for a site where every visitor sees the same pages: the pricing page, the migration guides, the blog.
Next.js is a React framework for applications. A route can run code when a request arrives: check who is logged in, read from your product's API, render a different page for a different person. It can build static pages too, and often does. The difference is that the machinery for per-request work is built in, and the browser receives React to run the interactive parts.
Neither is better in the abstract. One is shaped like a document and the other like an application.
What does not change
Where the words live. Both can read content from Sanity, so the person changing a headline does not care which framework renders it. Choosing Next.js is not choosing harder editing, and choosing Astro is not choosing a worse content system.
Where Next.js is the stronger tool
Four signals, each a question about the product rather than the marketing site:
- Customers log in somewhere on the product, and the account pages and the marketing pages keep drifting apart.
- A pricing calculator, status page or search reads from your product's API.
- Your product is React, and the product should share its components instead of copying them.
- A screen has to change for each person the moment the data changes, without waiting on a full rebuild.
Those describe an application. Next.js is shaped for that kind of work. They do not describe the marketing site in front of the application, which is the same pages for every visitor.
When it is Astro
When every visitor sees the same pages. That describes most marketing sites, including most of the ones I am asked to move off a site builder. There is no server code to run per request, so there is less that can fail at three in the morning, and the codebase stays small and plain for whoever works on it next.
What I will concede
Next.js can build the same static pages Astro builds here. If your engineers already live in React and will own the code, a React framework is a smaller jump for that team. That is a fact about the team, and it counts.
A folder of pages and an application that answers per visitor are different software. Check which one you are asking for before the build, not after.
Where the marketing site lands
The build I ship is The Everbase Stack: Astro or Next.js, with Sanity, on Cloudflare or Vercel. Sanity is the same either way. These four questions decide the framework.
- Does any marketing page change depending on who is looking at it?
- Does any marketing page read live data from your product?
- Will your product engineers own the site's code, and do they write React?
- Does a marketing page have to change for each person without a rebuild?
Four noes means the site is Astro. A yes means part of what you described is an application, and Next.js is the better fit. Both are on one price list, so the framework follows the site.
What is in this
Author
Gemin Pak
More to read
Let me plan your next step.
I can scope a migration. Send a brief and I will reply by email with next steps.