Skip to content

Payload CMS migration audit

Payload CMS SEO migration for Next.js sites

Payload is developer-friendly, but migrations still fail when collections, slugs, redirects, sitemaps, canonicals, preview routes, and product/category models are not tied to an SEO migration plan.

Open recovery hub

Payload SEO risk map

The checks that decide whether the migration is safe

AreaHow it failsAudit check
Collections and slugsPayload documents can publish with duplicate slugs, changed slugs, missing redirect records, or frontend paths that differ from the canonical field.Compare collection schema, slug history, old WordPress URLs, current frontend routes, canonical URLs, and XML sitemap entries by document type.
Next.js routingRoute handlers, catch-all routes, dynamic segments, localized paths, and product/category templates resolve more URL variants than the team intended.Crawl known route patterns and verify one indexable 200 URL per intended document, with redirects or canonical rules for every duplicate route.
RedirectsWordPress, WooCommerce, category, tag, media, and legacy subdomain URLs are not mapped to their closest Payload-backed frontend URL.Join old sitemap exports, GSC top pages, backlinks, redirect rules, Payload collections, and Vercel/CDN redirects before launch or recovery.
Metadata and canonicalsPayload SEO fields are optional, inherited incorrectly, or canonicalize to the CMS admin/API URL, old WordPress URL, or redirected frontend URL.Validate generated metadata for pages, posts, products, categories, filters, pagination, draft previews, and fallback templates.
Sitemap generationThe sitemap includes drafts, noindex documents, deleted products, soft 404 templates, redirected URLs, or stale lastmod values.Filter by publish status, robots policy, canonical target, HTTP status, internal-link state, and document update source before writing XML.
Preview and draftsDraft, preview, staging, Vercel deployment, or Payload admin URLs become crawlable and compete with production pages.Require noindex on preview/draft responses, block admin/API crawl paths, and verify production canonicals never point to preview hosts.
Product and category modelsProduct availability, replacement products, primary category, breadcrumb trail, filters, and schema fields are modeled separately from SEO rules.Review products and categories as SEO entities, not just CMS documents. Check stock state, redirects, canonicals, breadcrumbs, schema, and sitemap eligibility together.

Technical examples

Where the code needs to prove the SEO rule

Canonical helper from Payload fields

Canonicals should be generated from the production frontend route, not from Payload admin URLs, API URLs, or stale WordPress fields.

export function getCanonicalUrl(doc, siteUrl) {
  const path = doc.seo?.canonicalPath || doc.frontendPath;

  if (!path || path.startsWith('http')) {
    throw new Error('Canonical must be a production relative path');
  }

  return new URL(path, siteUrl).toString();
}

Preview and draft noindex

Preview and draft states can help editors without creating crawlable duplicate URLs on production or Vercel preview hosts.

export function robotsForPayloadDoc(doc, requestHost) {
  const isPreviewHost = requestHost.includes('vercel.app');
  const isDraft = doc._status !== 'published';

  if (isPreviewHost || isDraft || doc.seo?.noindex) {
    return 'noindex,follow';
  }

  return 'index,follow';
}

Sitemap eligibility filter

The XML sitemap should be an indexable URL list, not a dump of every Payload document that has ever existed.

export function includeInSitemap(doc, canonicalUrl) {
  return doc._status === 'published'
    && !doc.seo?.noindex
    && !doc.redirectTarget
    && canonicalUrl === doc.frontendUrl
    && doc.template !== 'not-found';
}

Model review

Payload documents need SEO fields that agree with the frontend

A product, category, article, or page is not safe because it exists in Payload. It is safe when route, status, canonical, redirect, sitemap, schema, and internal-link behavior agree.

Canonical frontend path

Old WordPress or WooCommerce URL

Redirect target and status

Published, draft, or archived status

Noindex override

Sitemap eligibility

Last modified source

Primary category

Breadcrumb trail

Product stock state

Replacement product or category

Schema type and required fields

Example findings

What a developer-ready Payload audit should surface

FindingEvidenceFixPriority
Missing product returns 200Deleted product URL renders a product-not-found template with HTTP 200 and a self-canonical URL.Return a real 404/410, redirect to a replacement when one exists, and remove the URL from the product sitemap.P0 when the product had clicks, revenue, or backlinks.
Draft content in sitemapPayload documents with `_status: draft` appear in `/sitemap.xml` and pass live URL Inspection as indexable.Filter draft, preview, archived, and noindex documents before sitemap generation and invalidate sitemap cache after publish changes.P0 for any exposed draft or staging content.
Old backend URL canonicalFrontend page canonicalizes to a WordPress, Payload admin, API, or redirected URL instead of the final production path.Generate canonicals from the production route helper and reject absolute external or admin URLs at validation time.P0 for pages with rankings or duplicate routes.
Duplicate collection routes`/products/chair`, `/product/chair`, and `/shop/chair` all return 200 with separate self-canonicals.Keep one production route, redirect legacy patterns, and align sitemap plus internal links to the chosen URL.P1 unless the duplicate owns current search visibility.
Category relation breaks breadcrumbsProduct has multiple categories, but the frontend picks a different primary category than the canonical category path.Store a primary category relation and use it consistently for URL, canonical, breadcrumb, Product schema, and internal links.P1 for large product/category catalogs.

Audit boundary

When Payload moves out of standard audit scope

Standard audit fit

Small Payload marketing site, contained route count, no catalog, no urgent traffic loss, and a clear old-to-new URL map.

Custom migration audit

Payload build with multiple collections, localized slugs, product/category models, redirects in CMS, custom sitemap generation, or 1,000+ public URLs.

Urgent recovery audit

Site already launched, GSC pages dropped, Google selected unexpected canonicals, old URLs return 404, or product/category visibility fell.

Evidence pack

Pull CMS, code, crawl, and Search Console evidence together

Payload migrations sit between content modeling and frontend routing. The useful audit connects both sides before fixes are ranked.

  • GSC Performance export by page and query before and after launch.
  • GSC Pages examples grouped by indexing reason, template, and collection.
  • Payload collection export for pages, posts, products, categories, redirects, and SEO fields.
  • Old WordPress or WooCommerce sitemap index plus current Payload/Next.js sitemap output.
  • Redirect table from Payload, Vercel, middleware, CDN, and any legacy WordPress plugin export.
  • Code access for route handlers, catch-all pages, generateMetadata, sitemap generation, draft mode, and middleware.
  • GA4 organic landing pages and key events for the same comparison windows.
  • Backlink or top-pages export for old URLs that must not be lost.

QA sequence

A Payload migration needs template-level SEO QA

  • Every public collection has a route rule, canonical rule, sitemap rule, and redirect rule.
  • Payload preview and draft URLs are usable by editors but not indexable by search engines.
  • Old WordPress, WooCommerce, and CMS slugs resolve through one-hop 301 redirects when a replacement exists.
  • Deleted pages, discontinued products, and removed categories have explicit replacement, 410, noindex, or exclusion rules.
  • Sitemaps are split or grouped when product/category volume makes one sitemap hard to debug.
  • URL Inspection samples cover pages, posts, products, categories, filters, and localized routes when present.

Recovery path

If rankings already dropped, diagnose before rebuilding again

The first deliverable should be a failure map: URL groups, evidence, root cause, fix owner, deployment path, and recrawl plan. A second rebuild is not the default answer.

Open the recovery audit page

Supporting assets

Use the Payload audit with the right evidence tools

Moving to Payload or already launched and losing visibility?

Send the launch date, Payload collections, sitemap URLs, redirect source, GSC access, GA4 access, route code, and which templates changed. The output is a developer-ready fix order for the migration.

View sample audit