← Blog

Headless CMS Next.js development: how to choose who builds it

For CTOs and engineering leads: decide if headless fits, choose between headless WordPress, Sanity, Contentful and Strapi, and vet who builds your Next.js frontend.

Get a summary withChatGPT Claude Google AI Mode
Abstract content blocks flowing from a CMS into a fast Next.js frontend, illustrating headless CMS Next.js development
On this page

You are weighing a headless CMS with a Next.js frontend, and the hard part is not the code. It is deciding whether headless fits, which CMS your editors will like, and who can build it without leaving you a site nobody can update. This guide gives you a way to decide all three.

Headless CMS Next.js development splits two jobs. A content system stores and edits pages, and a Next.js application renders them for visitors. Done well, editors publish in seconds, pages load fast and one content source feeds your website, an app or a kiosk. Done badly, editors lose their preview and engineers become the bottleneck for every headline change.

We build on WordPress, Webflow and Next.js, so we will say plainly when headless is the wrong call. Below you get a four-question decision flow, a CMS shortlist by who edits and who hosts, working code to hand to a builder, a cost and timeline picture, and the questions that expose real experience.

Key takeaways

  • Headless pays off when content feeds several channels or your engineers need full control of the frontend, and a traditional build is often better for a small marketing site.
  • Choose the CMS by who edits and who hosts: headless WordPress for WordPress teams, Sanity or Contentful for hosted structure, Strapi for self-hosting, the Webflow CMS API for marketing-led teams.
  • Pair Next.js incremental regeneration with on-demand revalidation, so a published change goes live in seconds without a full rebuild.
  • Test editor preview first, because a draft that cannot be seen on the real page is where headless projects lose their editors.
  • Eight questions about preview, revalidation, redirects and handover separate experienced builders from confident ones.

When headless CMS Next.js development pays off

Headless pays off when your content has to reach more than one place, or when your engineers need full control of the frontend. It costs more to start and more to run than a traditional site, so the return has to be something you can name. Use the tests below before you ask anyone for a quote.

Signs headless fits your team

Headless fits when most of these are true:

  • Your content feeds more than a website: a customer app, a kiosk, a partner portal or email.
  • Your content model is rich: products, case studies, locations, documentation and the relationships between them.
  • Your frontend needs interactions or performance that a theme or template cannot give you.
  • You have engineers, in house or with a partner, who will own the frontend for years.
  • Other systems (CRM, ERP, search, pricing) must show data inside the same pages.

Tick three or more and headless deserves a serious look. Tick one and a lighter option probably serves you better.

One stream of content splitting into separate channels for a website, an app and a kiosk, showing why teams go headless
One content source feeding several channels

Cases where a traditional build wins

A marketing site of a few dozen pages with a small team is usually better on WordPress or Webflow. Editors get a built-in preview, plugins or apps for forms and SEO, and one platform to maintain. You launch sooner and the monthly effort is lower.

Our pick for a small marketing team

Traditional build

  • Editors preview drafts out of the box
  • Plugins or apps cover forms, SEO and search
  • One platform to host and maintain
  • Faster to launch, lighter to run

Worth it when scale demands

Headless build

  • One content source feeds web, app and other channels
  • Full control of frontend speed and interaction
  • Preview, forms and SEO output are built by your team
  • Two systems to host and update

Between the two sits a hybrid. Keep WordPress as the site and move only the heavy pages, such as a catalog or a calculator, to Next.js. You get speed where it counts and editors stay where they are.

A decision flow in four questions

Answer these in order. The first and third decide the outcome. The second and fourth decide how much preview and revalidation work you budget.

  1. Do you publish to several channels, or run a complex content model?
  2. Do editors need a live preview of drafts on the real page?
  3. Can your team own a frontend codebase for years?
  4. Must a published change appear in under a minute?

A no on the first question points to a traditional CMS. A yes there and a no on the third points to the hybrid. Two yes answers, including the third, point to headless with Next.js.

Architecture decision

  1. 01Your content needsStart here
  2. 02Several channels or complex model?First decision
  • ATraditional CMSNo: WordPress or Webflow fits
  • BHybridYes, but team cannot own a frontend
    1. Lighter frontendNext.js only for heavy pages
  • CHeadless with Next.jsYes, and team can own a frontend
    1. Live preview needed?Budget preview work
    2. Under one minute?Budget revalidation

Decision flow where four questions lead to a traditional CMS, a hybrid build or headless with Next.js

A four-question path to the right architecture

How to choose your headless CMS

Pick the CMS by two questions before any feature list: who edits, and who hosts and upgrades it. A CMS your editors dislike will undo every gain in speed. For the concepts behind each product, read our guide to headless CMS and decoupled architecture.

Editors know WordPress

Headless WordPress

Editors keep Gutenberg. You host and update WordPress, and Next.js reads it through GraphQL.

Many editors, many locales

Sanity or Contentful

Editors use a hosted studio. The vendor runs the servers, and you pay by plan and usage.

Engineering-led, own your data

Strapi

Developers shape the schema. You host it, or choose Strapi Cloud, and you own upgrades.

Marketing-led, visual control

Webflow CMS API

Editors stay in Webflow collections. Next.js adds pages that Webflow cannot host.

Headless WordPress with WPGraphQL

Your editors keep the WordPress admin and Gutenberg, and Next.js reads content through the WPGraphQL (opens in a new tab) API. It suits teams with years of content in WordPress and a wish for a faster frontend. You still host and update WordPress. Plugins that print on the page (forms, SEO output, page builders) need a replacement or a bridge. Our note on WordPress as a backend and Webflow as a frontend covers the pattern.

Sanity and Contentful as hosted platforms

Both run the infrastructure, so nobody patches a server. Sanity defines the content model in code and lets engineers shape the editing studio. Contentful offers mature roles, workflows and locales, which larger organizations value. Pricing depends on seats, usage and plan tier, so check current terms and API limits against your traffic before you commit.

Strapi when you want to self-host

Strapi is open source and runs on your infrastructure, so you own the data and the schema. It fits engineering-led teams with data residency rules or a wish to avoid per-seat pricing. In return, your team or partner handles backups, upgrades and scaling. Budget that work as a monthly line, not a surprise.

Webflow CMS API for marketing-led teams

Editors work in the Webflow collections they already know, and Next.js reads them through the API. It fits a marketing team that wants visual control but needs app-like pages Webflow cannot host. Check collection item limits and API rate limits against your content volume. If the site needs none of that, Webflow on its own is simpler.

Pick the Next.js rendering strategy

Choose rendering by how fresh each page must be and how many visitors it gets. Next.js can serve prebuilt pages from a CDN and refresh them when content changes. Visitors get speed and editors get freshness. Caching defaults changed between releases, so check the Next.js documentation (opens in a new tab) for your version. If you are still comparing frameworks, our Next.js, Astro and Remix comparison helps.

Static pages and incremental regeneration

Static generation builds a page before any visitor asks, so it loads from the edge. It suits pages that rarely change, such as About or service pages. Incremental static regeneration (ISR) rebuilds a page in the background after a time window or a signal. Pages that depend on the visitor, such as an account area, render on each request.

Speed matters because Google's good threshold for Largest Contentful Paint is 2.5 seconds at the 75th percentile. A page served from cache starts with a head start. Here is a page that reads posts from WPGraphQL and tags the response for later refresh:

// app/blog/page.tsx
type Post = { id: string; title: string; slug: string };

async function getPosts(): Promise<Post[]> {
  const res = await fetch(process.env.WP_GRAPHQL_URL!, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      query: '{ posts(first: 10) { nodes { id title slug } } }',
    }),
    // Cache the response and tag it, so a webhook can refresh it on publish.
    next: { tags: ['posts'], revalidate: 3600 },
  });
  if (!res.ok) throw new Error('CMS request failed: ' + res.status);
  const json = await res.json();
  return json.data.posts.nodes;
}

export default async function BlogPage() {
  const posts = await getPosts();
  return (
    <ul>
      {posts.map((post) => (
        <li key={post.id}>
          <a href={`/blog/${post.slug}`}>{post.title}</a>
        </li>
      ))}
    </ul>
  );
}

The explicit tag and revalidate time opt this request into caching. That matters in releases where fetch is not cached by default.

Publish to live in seconds with revalidation

On-demand revalidation lets the CMS tell Next.js when something changed. A webhook fires on publish, a route handler checks a shared secret and marks the tag stale, and the next visitor receives a fresh page. There is no full rebuild and no waiting for a timer.

// app/api/revalidate/route.ts
import { revalidateTag } from 'next/cache';
import { NextResponse } from 'next/server';

const allowedTags = ['posts', 'pages'];

export async function POST(request: Request) {
  // The CMS webhook sends a shared secret in a header.
  if (request.headers.get('x-revalidate-secret') !== process.env.REVALIDATE_SECRET) {
    return NextResponse.json({ message: 'Invalid secret' }, { status: 401 });
  }

  const { tag } = await request.json();
  if (!allowedTags.includes(tag)) {
    return NextResponse.json({ message: 'Unknown tag' }, { status: 400 });
  }

  // Recent Next.js releases may expect a second argument: check your version.
  revalidateTag(tag);
  return NextResponse.json({ revalidated: true, tag });
}

Ask your builder to walk you through this path. A good answer names the webhook, the secret, the tag and what happens when the call fails.

Publish path

  1. 01Editor publishesChange saved in the CMS
  2. 02Webhook firesCMS sends secret and tag
  3. 03Route handler revalidatesChecks secret, marks tag stale
  4. 04CDN serves fresh pageNext visitor gets new version
  5. 05Visitor sees updateLive without a full rebuild

Publish path from CMS webhook to revalidation to CDN, with Draft Mode letting editors bypass the cache

How a published change reaches visitors, and how drafts reach editors

Caching layers worth asking about

When an editor reports that a published page still looks old, one of several layers is holding the previous copy. Ask which of these your builder has mapped:

  • The Next.js data cache, which stores fetched content by tag.
  • The full route cache, which stores rendered pages.
  • The CDN edge cache in front of your host.
  • The CMS API cache, which some platforms apply to read requests.
  • The browser cache, controlled by response headers.

A builder who can name the purge call for each layer has run this in production.

Give editors a preview they trust

Preview is the usual failure point of headless projects. A traditional CMS shows a draft on the real page without effort. In headless, someone has to build that path, and when it is skipped, editors publish blind and blame the whole project.

Test preview first

If editors cannot see a draft on the real page before publishing, they will resent the project. Ask your builder to demo preview on one template before building the rest.

Draft Mode from the CMS to the page

Next.js has Draft Mode (opens in a new tab) for this. The CMS preview button opens a route that checks a secret and sets a cookie. From then on, that editor's pages skip the cache and fetch drafts, while every other visitor keeps getting cached published pages.

// app/api/draft/route.ts
import { draftMode } from 'next/headers';
import { redirect } from 'next/navigation';

export async function GET(request: Request) {
  const { searchParams } = new URL(request.url);
  const path = searchParams.get('path') ?? '/';

  // Accept only our secret and local paths, so the link cannot redirect elsewhere.
  if (
    searchParams.get('secret') !== process.env.DRAFT_SECRET ||
    !path.startsWith('/') ||
    path.startsWith('//')
  ) {
    return new Response('Invalid token', { status: 401 });
  }

  // In Next.js 14 draftMode() is synchronous; awaiting it is harmless.
  (await draftMode()).enable();
  redirect(path);
}

The page then reads the flag and changes how it fetches:

import { draftMode } from 'next/headers';

async function fetchPost(slug: string) {
  const { isEnabled } = await draftMode();
  const res = await fetch(process.env.CMS_URL + '/posts/' + slug, {
    // Drafts skip the cache. Published content stays tagged for revalidation.
    ...(isEnabled
      ? {
          cache: 'no-store' as const,
          headers: { Authorization: 'Bearer ' + process.env.CMS_PREVIEW_TOKEN },
        }
      : { next: { tags: ['posts'] } }),
  });
  return res.json();
}
Editor's hands holding a translucent draft panel over a finished page, showing a draft previewed before it goes live
A draft seen on the real page before it goes live

Visual editing and what it adds

Preview shows a draft after you save. Visual editing goes further: the editor clicks text on the page and edits it in place, or watches the page change while typing. Sanity and Contentful offer versions of this, and headless WordPress can approximate it with preview links. It adds build time, so it pays off when many editors publish daily and matters less when two people post weekly.

Editor acceptance test before launch

Run this with the real editors, not the developers, and ask them to sign off in writing:

  1. Draft a new article with an image and preview it on the real template.
  2. Change a published page, preview the change, then publish it.
  3. Time how long the live page takes to show the update.
  4. Unpublish a page and confirm it disappears or redirects sensibly.
  5. Repeat the first step on a phone-sized screen.

What headless CMS Next.js development costs

Headless costs more than a traditional build of similar scope, both to start and to run. We do not quote prices here because they depend on scope, CMS plan and team. What you can compare is where the effort goes and what recurs every month.

Where the extra effort goes

A theme gives a traditional site many things for free. In headless, someone builds them, and each one is a line in the plan:

  • Content modeling with your editors, before any screen is designed.
  • Navigation, search, forms and sitemaps.
  • SEO metadata, structured data and redirects from old URLs.
  • Preview and revalidation.
  • Editor training and documentation.

A proposal that skips preview or redirects has not priced the project.

A typical project timeline

For example, take a company with 60 pages, three editors and one language. The durations below are illustrative and move with scope. A traditional build of the same site usually shortens the middle two phases.

  1. Weeks 1 to 3

    Content model and discovery

    Editors and engineers agree content types, fields, roles and freshness needs.

  2. Weeks 4 to 9

    Frontend build

    Templates, navigation, forms, SEO output and the rendering plan come together.

  3. Weeks 10 to 11

    Preview and editor training

    Editors run the acceptance test and learn the publishing flow.

  4. Week 12

    Launch and redirects

    Old URLs redirect, sitemaps are submitted and the cutover is monitored.

Launch deserves its own phase. Redirects, sitemaps and a watched cutover protect the search traffic you already have.

Running costs after launch

Expect these lines after launch:

  • Frontend hosting, charged by usage or by plan.
  • A CMS subscription or, if self-hosted, servers and backups.
  • Two codebases to update: the CMS and the Next.js dependencies.
  • Monitoring of webhooks, builds and API limits.
  • A builder on call for changes.

These are the cost of owning flexibility. A monthly care plan or retainer makes them predictable, and you should ask any builder what theirs includes.

Who can build it for you

Four kinds of builder can deliver headless CMS Next.js development, and each fits a different company. The right one depends on your team's capacity and on how many years you expect to run the site. Whichever you choose, you want someone accountable for the whole path from editor to visitor.

In-house, agency or freelancer

A headless agency brings a repeatable process and a team for design, content modeling and support. A decoupled CMS development company, which may call itself a platform studio, does the same with a narrower focus. If you want to hire a headless CMS developer directly, the table shows what to weigh.

OptionBest whenWatch for
In-house teamContent platform is core to the business and you can hire and keep engineersHiring time, bus factor, no outside view on architecture
Specialist headless agencyYou need a full build with preview, hosting and support in one teamLock-in on a single CMS, process built for larger budgets
WordPress or Webflow agency with Next.js depthEditors already live in WordPress or Webflow and you want a hybrid or headless stepAsk for shipped Next.js work, not only theme work
FreelancerSmall, well-defined build with a strong internal ownerSingle person for support, holidays and handover

If you are building a product rather than a content site, read our guide to choosing a Next.js development agency for SaaS.

What a good team owns end to end

A good team does not stop at the frontend. Ask who owns each of these, and plan for any line they leave to you:

  • The content model workshop with your editors.
  • The Next.js frontend and the rendering plan.
  • Preview, webhooks and revalidation.
  • Redirects, SEO output and structured data.
  • Hosting setup, monitoring and alerts.
  • Handover documentation and editor training.
  • Support after launch.

Vetting questions and red flags

You do not need to read code to vet a builder. You need questions whose answers are specific. Vague answers about preview or caching usually mean the builder has not shipped it.

Eight questions for the first call

  • Ask how editors preview a draft on the real page, and ask for a demo
  • Ask what happens between the publish click and the live page, step by step
  • Ask who designs the content model and who can change it later
  • Ask how old URLs will redirect and how you will check it
  • Ask which account owns the CMS, the hosting and the domain
  • Ask how builds, webhooks and API limits are monitored
  • Ask what the handover includes: code access, docs and editor training
  • Ask what you pay monthly after launch and what that covers

Red flags in proposals

Watch for these in a written proposal:

  • No line for preview or editor training.
  • A fixed price before any content model workshop.
  • A full rebuild on every publish, with no mention of revalidation.
  • CMS or hosting accounts in the builder's name.
  • No redirect plan for existing URLs.
  • A claim that headless is always faster, with no plan to measure Core Web Vitals.
  • No code access or handover documents.

One flag is a conversation. Three are a reason to keep looking.

Where to start this week

Open a spreadsheet and list your content types, who edits each one, and how fast a change must go live. Add every channel that will use the content. Ten rows are enough, and the result answers most of the decision flow above.

Then tell us your goal. We build on WordPress, Webflow and Next.js, so we recommend whichever fits, including a traditional build when it serves you best. See how we approach custom apps with Next.js, or tell us what you want to achieve. We reply in under 2 hours on business days.

Frequently asked questions

How much does a headless CMS with Next.js cost compared to a traditional website?

A headless build usually costs more than a traditional site of similar scope, because preview, navigation, forms, redirects and revalidation are built rather than bought as a theme. Running costs also rise with a second system to host and update. Ask for a quote that lists each of those lines.

Is headless WordPress with Next.js a good idea?

It is a good idea when your editors love WordPress, your archive is large and you want a faster, more custom frontend. It is a poor fit when a small team only needs a marketing site, because you still maintain WordPress and now a Next.js app as well.

Which headless CMS is best for Next.js: Sanity, Contentful or Strapi?

No single one wins. Sanity suits teams that want a customizable editing studio, Contentful suits larger organizations that need roles and locales, and Strapi suits teams that want to self-host. Choose by who edits and who hosts.

How long does it take to build a headless CMS website?

It depends on scope. As an illustration, a 60-page site with three editors and one language may take roughly a quarter from discovery to launch, with preview and redirects as separate phases. Integrations with a CRM or ERP extend that.

Can editors preview content in a headless CMS with Next.js?

Yes. Next.js Draft Mode lets a CMS preview button open the real page with drafts fetched and the cache skipped for that editor only. Test it with your editors before launch, because it is the step most often rushed.

Should I hire an agency or a freelancer for headless CMS development?

A freelancer can suit a small, well-defined build when you have a strong internal owner. An agency suits projects that need design, content modeling, hosting and support from one accountable team, especially when the site must be maintained for years.

Running into this on your own stack?

Tell us the platform and the problem. We'll tell you what it takes and who does it.

Start a conversation No commitment. Just a conversation.