Skip to content

Editors Publish, Pages Stay Fast: Shipping Next.js on a Headless CMS

How we ship · 16 min read
By Dapton Technologies·Updated

Our step-by-step flow for a fast Next.js site on a headless CMS: content modeling, CMS choice, editor preview, redirects, Core Web Vitals and launch checks.

Many new websites look great on launch day and cause trouble soon after. Editors wait on a developer for small changes. Pages slow down as scripts pile up. Old links break, and search traffic that took years to earn starts to slip.

Here is how we at Dapton ship a website on Next.js with a headless CMS. A headless CMS is a content system that stores your content and leaves page building to a separate front end. Next.js is the React framework we build that front end with. For each phase you will see what we do, what we check and what you receive. You will also see where AI helps and where a person decides.

Our flow for a Next.js site on a headless CMS. Some phases overlap, and you see working pages at the end of every sprint.

What does our Next.js and headless CMS flow look like, end to end?

We run ten phases, from discovery to handover, and some of them overlap. One team covers design, development, QA and DevOps, and you see working software at the end of every sprint.

AI tools help at almost every step. They draft content inventories, propose redirect maps and write first versions of components. An engineer reviews every change, and AI never approves its own code. The code lives in your repositories, and the CMS and hosting accounts belong to you.

The phases below follow the same pattern. First what we do, then what we check, what you receive, where AI helps, and the usual mistake we avoid.

1. Discovery: which content and search traffic must survive the move?

Discovery tells us what content you have, who edits it, what it connects to and which pages already earn search traffic. Those facts shape every later decision.

We crawl your current site and export every URL with its title, template and status code. We read your Google Search Console data to see which pages bring visitors and which searches they appear for. Then we ask the people who publish what they change most, what slows them down and who signs off.

  • Content types and volume: articles, landing pages, authors, events, downloads and anything else you publish.
  • Editors and roles: who writes, who reviews, who may publish, and in which languages.
  • Integrations: forms, your CRM, newsletter, analytics and site search.
  • The SEO baseline: pages with clicks, pages other sites link to, structured data already in place, and the current sitemap.
  • The speed baseline: Core Web Vitals for your main templates, from real visitors where that data exists.

What you receive: a content inventory, a list of pages you must not lose, and a brief that says what the new site has to do better.

Where AI helps: it groups thousands of URLs by template and flags thin or duplicate pages quickly. A person decides what stays, merges or goes.

The mistake we avoid is starting design before anyone has counted the content. A homepage mockup cannot tell you which old articles still bring in readers.

2. Content modeling: why does this one step decide everything?

A content model is the list of content types, their fields and how they link to each other. It decides what editors can do, what URLs look like and how fast pages refresh, so we settle it before design is final.

We model content by what it is, such as an article, an author or an event. Each type gets fields with clear names, help text and rules. An image field asks for alt text, the short description a screen reader reads aloud. A relation field links an article to its author, so the author's bio lives in one place.

Reuse is the payoff. Change an author's job title once, and the author page, the team page and every article by that author show the new title. And because the site knows which pages use which entry, a publish refreshes only those pages.

Illustrative content model. An editor changes one author entry, and only the pages that show that author refresh. The rest stay cached.
  • Every field has one job. We split the title on the page from the title in search results when they differ.
  • URLs come from a slug field with rules, so they stay short, readable and stable.
  • Rich text allows only the blocks your design supports.
  • Fields that feed structured data, such as dates and authors, are required.

What you receive: a content model diagram you can read without code, and a working CMS with sample entries your editors can try.

Where AI helps: we use it to draft a first model from the inventory and to spot fields that repeat. Your editors and our lead engineer then test it on real pages and fix it.

The mistake we avoid is copying the page layout into the CMS as one big page builder. Later, that content cannot be reused, and every redesign means typing it in again.

3. Sanity, Strapi, Payload or WordPress: which headless CMS fits your team?

Choose the CMS your editors will use every day without help, that holds your content model well, and that you are happy to host or pay for. We build with Sanity, Strapi, Payload and WordPress, and the right pick depends more on your team than on a feature list.

We look at four things: who edits, how much structure the content needs, where you want it hosted, and what your own developers already know.

  • Sanity fits when your team publishes often and several people edit at once. The editing studio is shaped in code around your workflow, and Sanity hosts the content for you.
  • Strapi fits when you want an open-source CMS you host yourself, with an admin panel editors find familiar. It comes with roles such as Author, Editor and Super Admin, and you can add your own.
  • Payload fits when your developers work in TypeScript and want the CMS inside the same codebase as the Next.js site. Content types are defined in code. Drafts, versions, autosave and scheduled publishing are built in.
  • WordPress fits when your editors already know it and years of content live there. We keep WordPress as the editing tool and read content through its REST API, which sends posts and pages as JSON data. Editors keep their habits, and visitors get a fast front end.

Sometimes we recommend against headless. A small site with one editor and rare changes may be better on a well-built WordPress theme. Headless adds a second system to run, so it has to pay for itself.

What you receive: a written recommendation with the reasons and trade-offs, and a trial where your editors build one real page in the chosen CMS.

The mistake we avoid is choosing from a feature table. The best CMS on paper is the wrong one if your editors avoid it.

4. Design system: how do we build speed and accessibility into every template?

We design a small set of components and page templates, each with accessibility and speed limits written down before design is final. Editors then build pages from parts that are already tested.

A design system is a library of reusable parts, such as cards, quotes and forms. Each part maps to a block or field in the CMS. We design to WCAG 2.2 level AA, the current W3C accessibility guidelines. That covers contrast, visible focus, resizable text and tap targets big enough for a thumb.

The speed budget is a short list of limits for each template. An illustrative one: one large image above the fold, sized for each screen; two font files; no third-party script near the top without a named reason. Our standing targets are Lighthouse 90+ and interactivity under one second. Lighthouse is Google's lab test for speed and quality.

  • Every component works with a keyboard alone and shows a clear focus ring.
  • Text and icons pass contrast checks in every theme the site has.
  • Images have fixed sizes or aspect ratios, so nothing jumps while the page loads.

What you receive: a component library with every state documented, page templates in design, and the written budget.

Where AI helps: it writes component variants and stress-test content, such as a headline three lines long. A designer and an engineer decide what ships.

The mistake we avoid is designing with perfect sample text. Real content is longer, shorter or missing, and the layout has to survive all three.

5. Building in Next.js: which pages should be static, and which should not?

We make every page static that can be static, refresh it when its content changes, and render on the server only what must be fresh for each visitor. Visitors get fast pages from a CDN, and editors still see their changes go live quickly.

Next.js gives us three main options. Static pages are built ahead of time and served from a CDN, a network of servers close to your visitors. Incremental Static Regeneration, or ISR, rebuilds a static page in the background when its content changes, without rebuilding the whole site. Server rendering builds a page on each request, which we keep for search results or account pages.

On a content site, articles, landing pages, author pages and category pages are usually static. When an editor publishes, the CMS calls a webhook, an automatic message sent to the site. The site then refreshes the pages tagged with that entry, using Next.js on-demand revalidation. Everything else stays cached.

Images go through the Next.js Image component. It serves the right size for each screen in modern formats like WebP and reserves space so the layout does not shift. The main image loads first; the rest load as the reader scrolls. Fonts are self-hosted. Third-party scripts load with the Next.js Script component, as late as they can, and only on pages that need them.

Each page takes its title, description, canonical URL and share image from CMS fields, through the Next.js Metadata API. A canonical URL tells search engines which address is the main one. Structured data is written as JSON-LD, a block of machine-readable facts, from the same fields the page shows. Google's guidelines say markup must describe what readers can see, so we never mark up hidden text. The sitemap is built from the CMS, with honest last-modified dates.

Pages are rendered on the server, so the content is in the first HTML the browser receives. Google's JavaScript SEO guide notes that not every bot runs JavaScript, so this helps search engines and AI assistants.

  • Publishing one entry refreshes only the pages that show it.
  • Every indexable page has a unique title, a description and a canonical that points to itself.
  • Structured data validates and matches the visible page.

What you receive: a Next.js codebase in your repository, a preview link for every change, and a document that explains the caching rules in plain words.

Where AI helps: it writes many first drafts here, including components, data queries and tests. An engineer reviews every pull request for intent, risk and security before it merges.

The mistake we avoid is rendering every page on the server just to be safe. It passes in testing, then gets slow and costly under real traffic.

6. Editor experience: how do your editors publish without calling a developer?

We set up roles, a draft and review flow, live preview and scheduling in the CMS. Then we connect publishing to the site, so only the changed pages refresh. Your editors write, check and publish on their own.

Illustrative editor workflow. Each role owns its steps, preview is open at every stage, and publishing refreshes only the changed pages.

Roles come first. In an illustrative setup, a writer creates and edits drafts. An editor reviews, comments and sends work back. A publisher approves and sets the live time. We match these to your real sign-off chain.

When an editor clicks Preview, the CMS opens the real page with the draft content in it. Next.js Draft Mode makes this work. It skips the cache for that one browser only. The preview link is protected by a secret shared only between the CMS and the site.

Publishing then calls the site's webhook. The webhook checks a shared secret, so nobody else can trigger it, and refreshes only the pages tied to that entry. A typo fix on one article refreshes that article and the lists that show its headline. Scheduled pages go live the same way, at the time a publisher sets.

  • Each role can do only what it should. We test with a writer account that tries to publish.
  • Required fields stop a half-finished page from going live.
  • Version history lets an editor roll back a bad edit without a developer.

What you receive: a CMS set up for your team, with roles, help text on every field and a one-page publishing guide.

Where AI helps: we can add assistants inside the CMS that draft a summary, tags or image alt text from the article. An editor approves or edits every suggestion before it publishes. For photos or video your readers need to trust, we can add C2PA Content Credentials. These are signed records of where a file came from and how it was edited.

The mistake we avoid is leaving preview for later. Editors who cannot see a draft publish it to check, and visitors see the mistakes.

7. Migration and redirects: how do we move a site without losing search traffic?

We import the content with scripts, map every old URL to its new home, set permanent 301 redirects and test them before launch. After launch we watch Search Console as the old URLs drop out and the new ones appear.

Illustrative URL map. Every old address gets a decision: keep, redirect, merge or remove on purpose.

Content moves by script, not by copy and paste. The script cleans the old HTML, uploads images and creates entries in the new model. We run it on staging until it is clean, then once more before launch. Your editors then spot-check pages.

The URL map is a spreadsheet with one row per old URL and its new address. Pages that move get a 301, a permanent redirect that tells search engines the new page replaces the old one. Pages you remove on purpose return a 404 or 410 status, which means gone. Google's site-move guide warns against sending many old URLs to the home page.

Each redirect goes straight to the final address, with no chain of hops in between. Google's guidance is to keep redirects for as long as possible, and at least a year. Image and PDF URLs go in the map too.

  • Every URL with clicks or links in the baseline has a row in the map.
  • Every redirect returns 301 and lands on a page that returns 200, tested by script.
  • Titles, descriptions and structured data carry over or improve, checked by hand for the top pages.
  • Any noindex tags or robots.txt blocks used on staging are removed at launch.

What you receive: the URL map, the redirect rules in your codebase, a test report and a list of what we will watch after launch.

Where AI helps: it is good at matching thousands of old URLs to new ones by title and content. A person reviews every match for the pages that matter, and a script tests the full list.

The mistake we avoid is changing the domain, the CMS and the design in one release. Google's advice is to change one thing at a time where you can. When a project must combine them, we keep URLs stable to reduce the risk.

8. Core Web Vitals and accessibility: how do we test real pages on real phones?

We test the actual templates with real content, on phones and desktops, against Core Web Vitals and WCAG 2.2. Automated tools catch part of the problems. People with a keyboard and a screen reader catch the rest.

Core Web Vitals are Google's three measures of page experience. Largest Contentful Paint (LCP) is how fast the main content appears; good is 2.5 seconds or less. Interaction to Next Paint (INP) is how fast the page responds to a tap or click; good is 200 milliseconds or less. Cumulative Layout Shift (CLS) is how much the layout jumps; good is 0.1 or less. Google reads them at the 75th percentile of real visits, so slower devices count.

Before launch there are no real visitors, so we use lab tests. We run Lighthouse on every template with the heaviest content we can find, such as the longest article or the biggest gallery. We also test on real phones on a slowed connection.

One client's music site went about 3x faster after we moved it to Next.js. It now has 450+ static pages and 1.1M+ monthly visits.

For accessibility, automated checkers find missing labels and low contrast. A tester also works through each template with only a keyboard, then with a screen reader such as VoiceOver or NVDA. We check that focus never hides behind a sticky header, one of the newer WCAG 2.2 rules, and that forms announce their errors.

What you receive: a speed and accessibility report for each template, listing what we tested and what we fixed. Testing never proves zero issues, so the report says what was covered.

Where AI helps: it reads a performance trace and suggests likely causes. An engineer confirms the cause before anyone changes code.

The mistake we avoid is testing an empty homepage on a fast laptop and calling it done.

9. Deployment: how does a change reach your live site, with a way back?

Every change runs automated checks, gets its own preview deployment, passes a review and goes live through a pipeline with a quick way back.

We deploy Next.js sites to Vercel, AWS or Cloudflare, depending on your setup. Build, test and deploy steps live in your repository and run on GitHub Actions or the host's own pipeline. Each pull request gets a preview deployment, a live copy of the site with that change in it.

Automated checks run on each change: type checks, tests for anything with logic, a redirect check, and a smoke test. It loads key pages and looks for a title, one main heading and valid structured data. Staging is a full copy of the site and its content, used for final sign-off.

A release goes live when a named person on your project signs it off. If something looks wrong, we roll back to the previous deployment. On Vercel, Instant Rollback points your domain back at the last good version without a new build. Sentry tracks errors per release.

What you receive: a pipeline in your repository, preview links for every change, a staging site and a written rollback plan.

Where AI helps: AI agents can open pull requests and fix failing tests. They work in their own branch with only the access they need. If a test fails, we fix the code. We never edit the test to make it pass.

The mistake we avoid is testing on staging with fake content. We test with your real, imported content, because real content finds real bugs.

10. The launch checklist: which 16 checks do we run before go-live?

We work through a written checklist on launch day, and a person ticks off each item. This is the list we start from and adjust for each site.

The launch board. Each check has an owner, and the site goes live only when all three columns are done.
  1. Redirects are live, and a script confirms every row of the URL map returns a 301 to a page that returns 200.
  2. Robots.txt allows crawling, and no staging noindex tag is left on any page.
  3. Canonical tags point to the live domain, not to staging.
  4. The XML sitemap lists only live, indexable URLs and is submitted in Search Console.
  5. Search Console and Bing Webmaster Tools are verified for the new site.
  6. Titles, descriptions and share images show correctly when a link is pasted into a chat or social app.
  7. Structured data passes Google's Rich Results Test on each template.
  8. Analytics records one page view per page, and visitors' consent choices are respected.
  9. Forms deliver to the right inbox or CRM, and show success only after the server confirms it.
  10. Lab tests show Core Web Vitals in the good range on each key template.
  11. Keyboard and screen-reader checks pass on the main journeys.
  12. A test edit in the CMS refreshes the right page and nothing else.
  13. Preview works for each role, and the preview secret is set in production.
  14. HTTPS, security headers and the choice of www or non-www are set and tested.
  15. Sentry and uptime alerts reach a named owner.
  16. The old site is backed up, and the rollback steps are written down and tried.

After launch: what do we watch, and what does your team get at handover?

We watch errors, speed and search signals after launch, train your editors, and hand over the code, the documents and the accounts. You own everything we build.

In Search Console we watch for crawl errors, unexpected 404s and pages dropping out of the index. Sitemaps for old and new URLs show the old count falling as the new one rises. Rankings can move around during a site move, so we read trends. We also watch real-visitor Core Web Vitals and Sentry errors.

Editor training uses your own content. Each editor writes a real page, previews it, sends it for review and schedules one.

At handover you get the code in your repositories and the CMS and hosting accounts in your name. You also get a caching guide, runbooks for common jobs and a list of next improvements. We can stay on, or your team can take it from there.

Six mistakes we design out of every headless CMS project

Most trouble on CMS projects comes from a few repeated choices.

  • Building pages before the content model is agreed.
  • Turning the CMS into a free-form page builder on every page.
  • Rendering everything on the server, then adding caching in a hurry when traffic arrives.
  • Letting third-party scripts pile up with nobody responsible for them.
  • Leaving the URL map until the last minute.
  • Handing over without training, so editors call a developer for every small change.

Common questions

Is a headless CMS better for SEO than WordPress?

Search engines rank pages, and either setup can produce good ones. Headless makes speed and clean markup easier to control. We choose based on your editors, your content and how often it changes.

Can we keep our URLs when we move to Next.js?

Usually, yes. Next.js lets us shape routes to match your current structure. Where a URL has to change, it gets a 301 redirect straight to its new address, and we test every one.

Will our editors need a developer to publish?

No. Editors write, preview, get approval and publish in the CMS. You need a developer only for new page types or new components.

How fast will the new site be?

We set a speed budget for each template and aim for Lighthouse 90+ and interactivity under one second. We report what we measured on real pages and devices. We do not promise search rankings, because search engines decide those.

Can AI assistants and AI crawlers read the site?

Yes, by default. Pages are rendered on the server, so the content is in the HTML. If you want to state terms for how AI companies may use your work, we can add Content Signals to robots.txt and publish an RSL license file. Signals block nobody, so we pair them with your host's bot controls.

Ready for a site your editors can run on their own?

If your site is slow, hard to edit or due for a move, tell us what you publish and who publishes it. We will look at your content and your search baseline, and tell you plainly whether headless is worth it for you.

Documentation and references

Next.jsHeadless CMSWebsite migrationTechnical SEOCore Web VitalsContent modeling
Need help building this for your product?

Working with Next.js and Headless CMS? Tell us what you’re building and our engineers will tell you how they would approach it.

Talk to our team →

More from the blog