SEO Migration.

wordpress to headless seo

WordPress to headless

The SEO plugin stops rendering anything. Every output it used to produce — canonicals, meta robots, sitemaps, schema, redirects — is now your front end's responsibility, and most teams discover that list one item at a time.

By Arsal Riaz, Technical SEO Consultant Published

Primary riskYoast or RankMath still shows green in the admin while producing no output at all on the live front end.

Definition
A WordPress to headless migration — A WordPress to headless migration keeps WordPress as the content store while replacing its theme layer with a separate front-end application that reads content over an API. SEO output previously generated by WordPress plugins is no longer rendered, so every tag, sitemap and redirect rule must be reimplemented in the new front end.

The failure is silent

Going headless does not break SEO. It removes the thing that was quietly doing SEO for you, and the removal produces no error.

For years, a WordPress SEO plugin has been rendering canonical tags, meta robots directives, Open Graph tags, an XML sitemap, structured data and a redirect table into every response. It did this through the theme layer. In a headless architecture, the theme layer is gone.

The plugin is still installed. The admin still shows green indicators. The fields are still filled in. None of it reaches the browser, because nothing is rendering it.

Verify against the response, not the admin

This is the single most useful habit for a headless migration: check the raw HTML of the live front end for every SEO output you expect.

The admin panel reports on stored field values. It has no visibility into what your Next.js or Astro application actually renders. A page can show a perfectly configured canonical URL in wp-admin and ship without a canonical tag at all.

The table on this page is the inventory. Work through it against view-source on the new front end, one route type at a time.

The origin has to be locked down

Headless setups routinely leave the WordPress origin publicly reachable — at cms.example.com, or at the original domain, or behind a hosting provider’s default URL.

Once it is reachable and linked from anywhere, it can be indexed. You now have two copies of the site: a fast new front end and the old WordPress theme output, competing with each other.

Authentication or an IP allowlist is the correct fix. X-Robots-Tag: noindex on the origin host is the minimum. robots.txt alone does not prevent indexing of a URL that has been linked — that is a crawl directive, not an index directive, and the distinction matters here more than almost anywhere else.

Preview deployments

Modern hosting platforms generate a public URL for every branch. Those URLs get pasted into tickets, chat and pull requests. Some of those surfaces are crawlable.

The result is a set of near-duplicate deployments in the index, each of which can outrank production for long-tail queries because they are functionally identical.

Set X-Robots-Tag: noindex at the platform level for every non-production hostname. It is one configuration entry, and every platform supports it.

The upside, stated fairly

Headless is not a compromise. Static generation and edge delivery typically produce better Core Web Vitals than a plugin-heavy WordPress theme, and the control over markup is genuinely better — you can emit exactly the structured data you want rather than what a plugin decides to produce.

The migration risk is entirely about completeness, not about the architecture. Teams who inventory the plugin’s outputs before starting tend to come through cleanly. Teams who discover the list after launch spend a quarter on it.

The general platform-migration method is on the replatform page, and the rendering verification sequence is set out on the technical scope page.

How this migration type goes wrong

The SEO plugin still reports everything is fine

What you see Yoast or RankMath shows green indicators in wp-admin. The live front end renders none of it, because the theme layer that used to output it is gone.

What fixes it Verify by fetching the raw HTML of the live front end, not by looking at the admin. The plugin is now a field store, not an output layer.

The API is exposed and indexable

What you see The WordPress origin or the REST API is reachable on a public host and starts appearing in search results as a duplicate of the site.

What fixes it Restrict the origin to the front end via authentication or IP allowlist, and serve X-Robots-Tag noindex on the API host.

Content only exists after client-side fetch

What you see Raw HTML contains a shell. Body copy and internal links appear only after the front end fetches from the API in the browser.

What fixes it Use static generation or server-side rendering for content routes. Client-side fetching of primary content is the wrong pattern for indexable pages.

Preview and staging environments get indexed

What you see Vercel, Netlify or equivalent preview deployments appear in search results, duplicating production on a public URL.

What fixes it Serve X-Robots-Tag noindex on all non-production hostnames at the platform level, and never rely on robots.txt alone to keep a linked URL out of the index.

WordPress SEO plugin outputs mapped to where each responsibility moves in a headless architecture.
Output Previously In headless Failure if missed
Title and meta description Rendered by the plugin into the theme headFront end reads the field from the API and renders itGoogle generates its own titles from page content
Canonical tag Plugin, automaticallyFront end must construct it from the request URLDuplicate content across paths, parameters and pagination
Meta robots Plugin, per postFront end must read and honor the per-post settingPages marked noindex in the admin are indexed anyway
XML sitemap Plugin, at /sitemap_index.xmlFront end generates it, or the API is queried at build timeSitemap 404s, or lists old URLs indefinitely
Redirects Plugin redirect managerFront end routing, or the edgeEvery managed redirect silently stops working
Structured data Plugin, from post fieldsFront end builds JSON-LDRich results disappear over several weeks
Open Graph tags PluginFront end renders themSocial shares lose their preview cards
What the SEO plugin used to do, and who does it now

When this page applies

  • WordPress is being decoupled from its theme layer.
  • A front end is being built on Next.js, Astro, Nuxt or similar against the WordPress API.
  • You are moving from a monolithic CMS to any headless architecture.

When it does not

  • You are changing WordPress theme but keeping the theme layer.
  • You are moving to a different traditional CMS.
  • The site is already headless and only the front-end framework is changing.

Headless launch checks

Every item here is something the plugin used to handle. The list is the migration.

  1. 01

    Inventory every plugin-rendered output

    Fetch the raw HTML of the current site and list everything the SEO plugin injects. That list becomes the front-end implementation backlog.

    Output Plugin output inventory

  2. 02

    Rebuild head tags in the front end

    Title, description, canonical, meta robots, Open Graph, Twitter card — each read from the API per route rather than hardcoded.

    Output Head implementation with per-route values

  3. 03

    Rebuild the sitemap

    Either generated at build time from the API or served dynamically. Confirm the URL matches whatever is referenced in robots.txt and submitted to Search Console.

    Output Working sitemap at a stable URL

  4. 04

    Migrate the redirect table

    Export the plugin’s redirect rules and reimplement them in front-end routing or at the edge. These are invisible until they stop working.

    Output Migrated redirect rules with test results

  5. 05

    Lock down the origin

    The WordPress host and REST API must not be publicly indexable. Authentication or an IP allowlist, plus X-Robots-Tag noindex on that host.

    Output Origin access policy

  6. 06

    Verify rendering per route type

    Fetch raw HTML for each route type and confirm content, internal links and head tags are present without JavaScript execution.

    Output Rendering verification by route

  7. 07

    Noindex every preview environment

    Preview deployments get linked in tickets and chat, and linked URLs get discovered. Handle it at the platform level, not in robots.txt.

    Output Preview environment headers confirmed

Questions people ask before starting

Does going headless hurt SEO?

Not inherently — a well-built headless site can outperform the theme it replaced, particularly on Core Web Vitals. The damage comes from unnoticed omission: every SEO output the plugin used to render must be rebuilt, and teams typically discover the list one missing item at a time.

Does Yoast still work in a headless setup?

As a field store, yes — it keeps the values. As an output layer, no. The plugin renders tags into the theme, and there is no theme. The front end has to read those fields over the API and render them. The admin will keep showing green regardless.

How do redirects work in headless WordPress?

They have to move. Plugin-managed redirects stop being applied once requests no longer pass through WordPress. Export the rules and reimplement them in front-end routing or, preferably, at the edge where they survive deploys.

Should content be server-rendered or client-fetched?

Server-rendered or statically generated for anything you want indexed. Client-side fetching of primary content puts your pages in the rendering queue and makes internal links slow to discover. Client-side fetching is fine for genuinely interactive, non-indexable parts.

Planning this move?

Send the launch date and what is changing. We will tell you which parts of this page apply to your situation and which do not.

Reply
Typically within one business day.
Hours
Monday to Friday, 9am–6pm US Eastern.
First call
Scoping, not a pitch. No deck.