promptunit

Headless CMS SEO Setup Checklist

Going headless gives you speed and freedom, but you lose all the SEO features a normal CMS gives you for free: sitemaps, redirects, canonicals and meta tags. This prompt builds a complete SEO setup plan for your headless stack, splitting the work between CMS fields and front-end code.

Works in ChatGPTClaudeGemini500 words7 inputs to fillSEO-040

Example input

This is exactly what we gave the model. You replace it with your own details.

- Website (or staging URL): https://staging.example.org (new site for a travel company)
- Headless CMS: Sanity
- Front-end framework and rendering: Next.js with static generation and on-demand revalidation
- Hosting and CDN: Vercel
- Page types: Home, destination pages, tour pages, blog posts, author pages, landing pages for ads
- Languages or regions: English (UK) and German at /de/
- Is this a migration from an old site? Yes, from WordPress (about 900 URLs today)

Real output

Pasted straight from the model. We did not fix a word.

SEO setup plan: Sanity + Next.js + Vercel (travel site, EN-GB + DE, WordPress migration)

Questions first (I use these guesses in the plan below)

  1. Which Next.js version and router? Guess: Next.js 15 or 16 with the App Router. I flag version differences where they matter.
  2. What is the production host? Guess: https://www.example.org, the same host WordPress uses today. That makes this a re-platform, not a domain move.
  3. Will you keep the WordPress URL paths? Guess: yes for destinations, tours and posts, including WordPress's trailing slash (/tours/amalfi-coast-walk/). Only WordPress-only URLs (tags, categories, attachments, feeds, date archives) go away.
  4. Who is each language for, and is everything translated? Guess: English is for the UK first (en-GB). German is for all German speakers (de). German slugs are translated, and not every page has a German version. The WordPress site already has German pages under /de/ (WPML or Polylang).
  5. Where do tour prices and dates come from? Guess: a booking system. A "from" price is synced into Sanity, and live dates and availability load in a client-side booking widget.

Smaller guesses, also labelled where they appear: the brand name is "Example Travel", Sanity Studio is embedded at /studio, and ad landing pages live under /lp/.


1. CMS field table (Sanity)

How to build it

  • Make one reusable object type, seo, and add it to every page type in an "SEO" field group. Use one shared image type with alt text everywhere, including inside Portable Text.
  • Use Rule.max(60).warning()-style rules for soft limits, so editors can still publish. Use errors only for things that break URLs, links or translations.
  • Translations: use document-level i18n with @sanity/document-internationalization. That gives one document per language, each with its own slug and SEO fields, linked through translation.metadata documents. Plugin note: current versions of the plugin need Sanity Studio v3 or later.
  • Build structured data from normal content fields. Editors never paste raw JSON-LD.
Content typeFieldTypeValidationDefault
All page types (seo object)seo.titlestringWarning over 60 characters, counting the brand suffix the front end adds; error over 70. German titles run longer, so warn, don't blockEmpty → page title + brand suffix
All page typesseo.descriptiontext (3 rows)Warning under 70 or over 160 characters; required on Tour and DestinationEmpty → summary/excerpt, cut at about 155 characters on a word break
All page types except HomeslugslugRequired; only a–z, 0–9 and -; max 75 characters; unique per type and language (custom isUnique); custom slugify turns ä/ö/ü/ß into ae/oe/ue/ssGenerated from title
All page typesseo.canonicalOverrideurlOptional; must be an absolute https://www.example.org/… URL; shows a warning when filled, and another if noindex is also onEmpty = self-canonical (built by the front end)
All page typesseo.noindexbooleanField description warns: "removes this page from Google and the sitemap"false (Landing page: true)
All page typesseo.ogImageimage (hotspot on)Min 1200 × 630 px. A custom validator reads the size from the asset ID (image-…-1200x630-jpg)Empty → hero/main image → site default
All page typeslanguagestring, read-onlyen-GB or deSet by the i18n plugin
All page typesTranslations (source for hreflang)plugin's translation.metadata (references)One document per language; same document typeLinked by editors from the "Translations" menu
All migrated documentslegacy (wpId, wpUrl)object, read-onlywpUrl uniqueFilled by the import script
Every image fieldalt + decorativestring + booleanalt required unless decorative is on; max 125 charactersImported from the WordPress media library alt text
Home (singleton per language)title (H1)stringRequired—
HomefeaturedDestinations, featuredToursarray of referencesAt least 3 each (gives crawl paths to key pages)—
Destinationtitle (H1)stringRequired, max 70—
Destinationparentreference → DestinationCan't reference itself; max 2 levels (e.g. Italy → Amalfi Coast)Empty = top level
DestinationsummarytextRequired, 100–300 characters—
DestinationheroImageimage + altRequired—
DestinationbodyPortable TextRequired; warning under ~300 words (thin page)—
DestinationgeogeopointOptionalEmpty
Destination, Tourfaqsarray of {question, answer}Max 10; question and answer both requiredEmpty
Tourtitle (H1)stringRequired, max 70—
Tourdestinationsarray of references → DestinationAt least 1; the first one is primary (breadcrumb)—
ToursummarytextRequired, 100–300 characters—
TourheroImage, galleryimage + altHero required—
TourdurationDaysnumberWhole number, 1–60—
Touritineraryarray of {day, title, description, places → Destination}Day numbers unique and in orderEmpty
TourpriceFrom + currencynumber + string listpriceFrom > 0; currency GBP or EURSynced from the booking system and read-only for editors (guess); GBP on en-GB, EUR on de (guess)
TourbookingIdstring, read-onlyRequired when the tour is bookableFrom sync
Tourstatusstring list (active, discontinued)If discontinued, a replacement reference is requiredactive
Blog posttitle (H1)stringRequired, max 100—
Blog postexcerpttextRequired, 100–200 characters—
Blog postmainImageimage + altRequired—
Blog postauthorreference → AuthorRequired—
Blog postpublishedAtdatetimeRequiredNow, on create
Blog postupdatedAtdatetimeOptional; must be after publishedAt; set only for real content updatesEmpty
Blog postrelatedDestinations, relatedToursarray of referencesWarning if both are empty (no internal links)—
All Portable TextLink annotationsinternalLink (reference), externalLink (url + rel: none, nofollow, sponsored)Internal links must be references, never typed URLs; external links must be httpsrel = none
AuthornamestringRequired—
AuthorjobTitlestringOptional, max 60—
AuthorbiotextRequired, at least 150 characters—
Authorphotoimage + altRequired—
AuthorsameAsarray of urlhttps only; max 6Empty
AuthorknowsAboutarray of references → DestinationOptionalEmpty
Landing page (ads)slugslugMust sit under /lp/ (guess)From title
Landing pageseo.noindexbooleanWarning when turned off: "only if this page has unique content"true
Site settings (singleton per language)siteName, titleSuffixstringRequired; suffix max 20 characters"Example Travel" (guess)
Site settingsdefaultOgImageimageRequired, min 1200 × 630—
Site settingsorganization (legal name, logo, phone, email, address, sameAs, memberships such as ABTA/ATOL if you have them)objectLogo at least 112 × 112 px; all URLs https—
RedirectfromstringRequired; starts with /; lowercase; no domain and no ?; ends with / unless it is a file path; unique—
RedirecttostringRequired; starts with / or https://; not the same as from; must not be another redirect's from (no chains)—
Redirectpermanentboolean—true (308)
Redirectsourcestring list (migration, editor, slug-change), read-only—Set automatically
RedirectnotetextOptional—

2. Front-end requirements checklist (Next.js on Vercel)

2.1 Rendering per page type

Page typeRenderingRevalidated whenNotes
Home (/, /de/)StaticHome doc, site settings or a featured doc changes—
DestinationStatic, generateStaticParams for every published slug × language; dynamicParams = true so new pages render on first requestAny Destination change; old and new path on slug changeTour lists rendered on the server
TourStaticAny Tour change; plus a time-based fallback (e.g. hourly) in case a price sync misses a webhook"From" price in the HTML; live availability in a client island
Blog postStaticPost or its author changesBlog index pagination as real URLs: /blog/page/2/
AuthorStaticAuthor or any of their posts changesLists all their posts as links
Ad landing pageStaticLanding page changesnoindex; not blocked in robots.txt
Draft previewDynamic, only in Draft Mode—Never cached publicly; always noindex
  • Main content, title, meta tags, canonical and JSON-LD are in the server-rendered HTML. Use "use client" only for interactive parts (booking widget, gallery, map, filters). Test: curl -s URL | grep "a sentence from the body".
  • Content pages don't read cookies(), headers() or searchParams. Any of these makes the route dynamic, and it loses the static cache. Read gclid/UTM values in the browser instead.
  • All server fetches use Sanity perspective: 'published'. Version note: from API version 2025-02-19 this is the default. With an older apiVersion plus a token, the default is raw, which can leak drafts into pages and sitemaps.
  • Server fetches that fill the Next.js cache use useCdn: false. Otherwise a revalidation that runs right after a webhook can cache stale data. The Next.js cache already absorbs the traffic.
  • /api/revalidate checks the Sanity webhook signature (parseBody from next-sanity/webhook), then revalidates by tag. Tag by document type: it's simple and safe at your size. On a slug change, also revalidate the old path and the sitemap.
  • Tell "missing" apart from "failed". If Sanity returns null, call notFound(). If the request fails (timeout, 5xx), throw, so ISR keeps serving the last good version. Never turn a failed fetch into a 404, or ISR will cache a 404 for a real tour page.
  • Version note: the cache APIs differ by version. Next.js 14/15 use fetch(..., { next: { tags } }) + revalidateTag(tag). Next.js 16 adds Cache Components ('use cache', cacheTag), and its revalidateTag takes a second cache-profile argument. next-sanity's defineLive/sanityFetch wraps much of this. Pick one approach and use it everywhere.

2.2 One URL builder

  • One function, e.g. resolveHref({ _type, language, slug }), builds every URL: links, canonicals, hreflang, sitemaps, redirects and og:url.
  • Path prefixes per type and language live in one config file, e.g. tour → /tours/ and /de/reisen/. Guess on the German folder names: if WordPress already has German folder names, keep those.
  • Output is always lowercase with a trailing slash (to match trailingSlash: true, guess 3).
  • The base URL comes from NEXT_PUBLIC_SITE_URL=https://www.example.org, set for the Production environment in Vercel. Never use VERCEL_URL for canonicals or sitemaps: it is the deployment URL (*.vercel.app).

2.3 Head tags (Metadata API)

  • Every page has its own generateMetadata, built by one helper, buildMetadata(doc, lang). Version note: in Next.js 15+, params is a Promise (const { slug } = await params).
  • The root layout for each language sets metadataBase and title: { template: '%s | Example Travel' } (brand is a guess).
  • Title = seo.title or title. Description = seo.description or summary/excerpt, cut at about 155 characters.
  • One canonical per page. It is absolute and self-referencing unless canonicalOverride is set. It carries no query string, so utm_*, gclid and fbclid from your ads are dropped. Paginated pages point to themselves (/blog/page/2/ → itself, not page 1).
  • Never set alternates.canonical in a layout. Next.js merges metadata shallowly, so a page without its own alternates inherits the layout's canonical, and every page ends up canonical to the home page. Set canonical and languages together in the page's alternates object.
  • Robots meta: robots: { index: false, follow: true } when noindex is on. Landing pages are noindex by default.
  • hreflang via alternates.languages: en-GB, de and x-default (rules in 3.6).
  • Open Graph and Twitter: og:title, og:description, og:url (= canonical), and og:image at 1200 × 630, built with @sanity/image-url using the hotspot crop. Also og:locale (en_GB / de_DE), og:type article on posts, and twitter:card summary_large_image.
  • <html lang="en-GB"> / <html lang="de">. This needs the root layout under app/[lang]/. Middleware rewrites /tours/x/ to /en/tours/x/ internally (the visitor still sees /tours/x/). A direct request to /en/... gets a 308 to the unprefixed URL. Version note: middleware.ts is called proxy.ts from Next.js 16.
  • Version note (Next.js 15.2+): on dynamically rendered routes, metadata can stream into the body for user agents not on the htmlLimitedBots list. Your static pages are not affected. If any route becomes dynamic, add AI crawlers (GPTBot, OAI-SearchBot, ClaudeBot, PerplexityBot) to htmlLimitedBots, or test that metadata is in <head>.
  • Check the raw HTML of every template with curl, not in a browser: exactly one canonical, one title, one description, and no leftover tags from third-party scripts.

2.4 JSON-LD

  • Render it on the server in the page component as <script type="application/ld+json">. Serialize with JSON.stringify(data).replace(/</g, '\\u003c') (the Next.js docs recommend this to prevent XSS).
  • Type it with schema-dts (TypeScript types for schema.org).
PageJSON-LDNotes
HomeOrganization + WebSiteUse TravelAgency instead if customers visit an office (guess: they don't). Logo, sameAs, contact details. Skip SearchAction: Google retired the sitelinks search box in Nov 2024
DestinationTouristDestination + BreadcrumbListNo Google rich result, but it helps entity understanding and AI answers
TourTouristTrip with offers (Offer: price, priceCurrency, availability, url), provider, itinerary + BreadcrumbListDon't mark tours up as Event: Google's event guidelines exclude travel packages. Review stars only with real reviews of that tour shown on the page, and the rich result isn't guaranteed
Blog postBlogPosting (headline, image, datePublished, dateModified, author → Person with the author page URL, publisher) + BreadcrumbListdateModified from updatedAt
AuthorProfilePage with mainEntity: Person (name, jobTitle, image, sameAs, knowsAbout)—
Ad landing pageNone neededPage is noindex
FAQ blocksFAQPage (optional)Since 2023, Google shows FAQ rich results only for well-known government and health sites. Use it for understanding only
  • JSON-LD values match what's on the page (price, dates, author). If the price only shows in the client widget, leave offers out.
  • Every template passes the Rich Results Test (BlogPosting, BreadcrumbList, ProfilePage) and the Schema Markup Validator (TouristTrip, TouristDestination).

2.5 Links

  • Every internal link uses next/link, which renders a real <a href>. No onClick={() => router.push()} on divs or buttons for navigation.
  • Portable Text internal links are references, resolved through resolveHref at render time. A slug change never breaks a link, and links never point at a redirect.
  • The header, mega menu, footer and breadcrumbs are in the server HTML, not loaded on hover.
  • Pagination uses <a href="/blog/page/2/">, not just a "Load more" button.
  • Tour filters (duration, month, price) are UI state: the canonical points to the clean listing. If a filter combination deserves to rank (e.g. "walking tours in Italy"), make it a real page in Sanity.
  • The language switcher links to the real translation from the translation metadata. If there is no translation, it links to the German home page.
  • Partner and affiliate links get rel="sponsored" or nofollow from the Portable Text field.

2.6 Images

  • next/image with a custom loader that builds Sanity CDN URLs (@sanity/image-url, auto=format, set width steps) for srcset. Sanity already transforms images, so you don't pay twice for Vercel Image Optimization. That cost depends on your plan; Vercel's optimizer also works.
  • alt comes from Sanity; use alt="" when the image is marked decorative.
  • width/height come from the asset metadata (or the asset ID), so there is no layout shift.
  • Set sizes per layout (hero 100vw; cards (min-width: 1024px) 33vw, 100vw).
  • Only the hero (usually the LCP element) gets priority (or its replacement in your Next.js version). Everything else lazy-loads (the default).
  • Blur placeholder from Sanity's metadata.lqip.
  • Optional: Sanity vanity filenames (…/image-id-2000x1333.jpg/amalfi-coast.jpg) for readable image URLs.

2.7 Status codes

  • An unknown or unpublished slug calls notFound() in both generateMetadata and the page, before any <Suspense>. That gives a real 404 and a localized not-found.tsx (English at root, German under /de/), with links to destinations and search.
  • No loading.tsx on content routes. Once streaming starts, a 200 has already been sent, and a later notFound() can't change it (Next.js only adds a noindex meta tag).
  • If guess 1 is wrong and you use the Pages Router: getStaticProps returns { notFound: true }, with fallback: 'blocking'.
  • Removed WordPress URLs return 410 (see 3.5). Redirects are one hop, 308 or 301. Errors return 500, never a 200 "something went wrong" page.
  • Empty search results and empty filtered listings are noindex.
  • A CI test runs curl -I on known 200, 404, 410 and 308 URLs.

2.8 Core Web Vitals on this stack

Targets at the 75th percentile on mobile: LCP ≤ 2.5 s, INP ≤ 200 ms, CLS ≤ 0.1.

LCP

  • Keep pages static so Vercel serves them from the edge cache (fast TTFB). See 2.1 for what makes a route dynamic.
  • Hero image: priority, correct sizes, Sanity auto=format (WebP/AVIF), quality around 75.
  • Load fonts with next/font (self-hosted, preloaded, size-adjusted fallback). Two families at most.
  • Set the Vercel Functions region to London (lhr1) or Frankfurt (fra1), so cache misses, revalidation and Draft Mode render near your UK and German users. The default region is in the US.

INP

  • Keep client components small: the booking widget, gallery and map are islands. The map loads on click, with a static image as a placeholder.
  • Third-party scripts: Google Tag Manager via @next/third-parties; ad pixels via next/script with afterInteractive or lazyOnload. Re-test whenever someone adds a tag.
  • Load the consent banner (needed for UK and German privacy law) without blocking rendering.

CLS

  • Every image has width and height. Reserve space for the booking widget, review widget and map. The cookie banner overlays the page rather than pushing content down.
  • Nothing gets inserted above existing content after load (promo bars included).

Measure

  • Lighthouse CI on pull requests for the six templates, with a mobile LCP budget of 2.5 s.
  • Field data from Vercel Speed Insights (depends on plan), plus the Search Console Core Web Vitals report after launch.
  • Ad landing pages: speed also affects landing page experience in your ad platforms.

3. Site-level feature checklist

3.1 XML sitemaps

  • A sitemap index at /sitemap.xml, with one child per type: sitemap-pages.xml, sitemap-destinations.xml, sitemap-tours.xml, sitemap-posts.xml, sitemap-authors.xml. Each includes both languages. About 900 URLs × 2 languages would fit in one file (the limit is 50,000), but per-type files let you see indexing by type in Search Console.
  • Build them as route handlers (e.g. app/sitemap-tours.xml/route.ts) for full control. The alternative is app/sitemap.ts + generateSitemaps. Version note: some versions don't create the index file for you, so check.
  • Include only URLs that are published, noindex = false, have no canonical override and return 200. Build them with resolveHref. Leave out landing pages, paginated pages, redirects and 404s.
  • lastmod = _updatedAt (posts: updatedAt or publishedAt), never the build time.
  • Put hreflang in the HTML head (3.6), not in the sitemaps. One method is easier to keep correct.
  • Sitemaps are revalidated by webhook on every publish, unpublish and delete.
  • The index is listed in robots.txt and submitted in Search Console and Bing Webmaster Tools.

3.2 robots.txt (app/robots.ts, depends on environment)

Production (www.example.org):

User-agent: *
Disallow: /api/
Disallow: /studio
Sitemap: https://www.example.org/sitemap.xml
  • Don't block /_next/: Google needs the CSS and JS to render pages.
  • Don't block /lp/. Use noindex on landing pages instead. A robots.txt block would hide the noindex from Google, and Google's AdsBot ignores User-agent: * rules anyway.
  • On any non-production host or VERCEL_ENV, the same file serves Disallow: /. This is only a backup; real protection is in 3.7.
  • Decide on AI crawlers on purpose. Guess: you want to appear in AI answers, so don't block GPTBot, OAI-SearchBot, ClaudeBot, PerplexityBot or Google-Extended. Google-Extended doesn't affect Google Search or AI Overviews. Also check that Vercel Firewall bot rules (such as an AI-bot managed ruleset, depending on plan) aren't blocking them.

3.3 One host, HTTPS, trailing slash, lowercase

  • In Vercel → Project → Domains: www.example.org is the production domain, and example.org redirects to it (permanent). Vercel redirects HTTP to HTTPS automatically.
  • The *.vercel.app production URL is either under Deployment Protection or gets X-Robots-Tag: noindex (middleware rule: host is not www.example.org).
  • trailingSlash: true in next.config (guess 3: it matches WordPress, so 900 URLs don't each need a slash redirect). Next.js 308-redirects the other form.
  • Middleware 308-redirects any path with uppercase letters to lowercase, and collapses //. Skip /_next/, /api/ and files. Work out the final URL first, then redirect once, so there are no chains.
  • Query parameters never create a new canonical.

3.4 Redirects manager

LayerWhereWhatWho
1. HostVercel DomainsApex → www, HTTP → HTTPSFront-end dev, once
2. Codenext.config redirects() + middlewareURL normalization, WordPress pattern rules, the migration 1:1 map (redirects.json) and the 410 list (gone.json)Front-end devs
3. CMSSanity Redirect documentsEditor redirects and automatic slug-change redirectsEditors + automation
  • How Sanity redirects reach the site. Option A (simple, my pick): next.config redirects() fetches the Redirect documents at build time, and a Sanity webhook on Redirect changes calls a Vercel Deploy Hook. Changes go live in a few minutes. Option B (instant): the webhook writes redirects to Vercel Edge Config and middleware reads it. Edge Config size limits depend on plan.
  • Limits: Vercel caps the number of redirects/routes per deployment (roughly 1,000–2,000, depending on version and config; check current limits). That's why the ~900-entry migration map lives in a middleware lookup, not in next.config. Use Vercel's bulk redirects feature instead if your plan has it.
  • Slug change rule: when a published document's slug changes, a redirect from old to new is created automatically. Use a Sanity GROQ webhook with filter _type in ["destination","tour","post","author"] && delta::changedAny(slug) and projection {"from": before().slug.current, "to": after().slug.current, language}. Its handler creates the Redirect document (source: slug-change) and revalidates both paths. A custom Studio document action is the alternative.
  • If a parent Destination's slug is part of child URLs, the handler also redirects every child path.
  • Unpublish/delete rule: if the page had traffic, editors set a replacement (discontinued tours use the replacement field). Otherwise the page returns 404 or 410.
  • No chains: when A → B exists and B → C is created, the handler rewrites A → C. Validation blocks loops.
  • Redirects are permanent by default. Keep migration redirects for at least a year, ideally forever. Every target must return 200 and be indexable.

3.5 404 and 410 handling

  • notFound() gives a real 404 with a localized, helpful page. Never redirect all 404s to the home page: Google treats that as a soft 404.
  • A 410 list (gone.json, from the migration sheet) covers URLs removed on purpose: WordPress tags, attachment pages, date archives, /feed/ (if you have no new feed) and old offers. Middleware returns status 410 with a small HTML page with links.
  • Log 404 paths (Vercel log drain or an analytics event on the not-found page) and review them weekly. Add redirects where needed.

3.6 hreflang

  • Values: en-GB (English, at root), de (German, /de/), and x-default pointing to the English version (guess 4).
  • Generated from Sanity's translation metadata. Never typed by hand.
  • Each page lists itself and each translation, both ways (EN ↔ DE), using absolute canonical URLs.
  • A translation is included only if it is published, indexable, self-canonical and returns 200. Otherwise the pair is dropped on both sides.
  • No automatic redirects by browser language or IP. Googlebot crawls mostly from the US without an Accept-Language header, so it would only ever see one version. If you use next-intl, set localeDetection: false and localePrefix: 'as-needed'. Show a dismissible "Auf Deutsch lesen" banner instead.
  • /en/… paths 308-redirect to the unprefixed URL, so each English page has exactly one URL.

3.7 Preview and staging safety

  • Vercel Deployment Protection is on for all preview deployments and for staging.example.org. Vercel Authentication is available on all plans; Password Protection depends on plan. Test in an incognito window: you should see a login screen, not the site.
  • X-Robots-Tag: noindex, nofollow on every response when VERCEL_ENV !== 'production' or the host isn't www.example.org. Vercel adds a noindex header to preview URLs by default, but don't rely on that for your custom staging domain.
  • Staging robots.txt serves Disallow: / as a backup.
  • Draft Mode (Sanity Presentation tool) is enabled only through the secret route from next-sanity (defineEnableDraftMode). Draft pages always output noindex and are never cached publicly.
  • The Sanity read token is server-only and never in a NEXT_PUBLIC_ variable.
  • The /studio route is noindex (recent versions of next-sanity's studio metadata export do this; check) and disallowed in robots.txt.
  • Test scripts and crawlers reach staging through Vercel's Protection Bypass for Automation (the x-vercel-protection-bypass header). Never turn protection off for testing.
  • After launch, the old WordPress server can't be reached on any other host (an old. subdomain or the server IP), or it is protected and noindex.

3.8 Migration: redirect and URL mapping plan (WordPress → Sanity + Next.js)

Step 1: Inventory every URL, not just the ~900 pages. Sources:

  • a crawl of the live site (Screaming Frog or Sitebulb)
  • the WordPress/Yoast/Rank Math XML sitemaps
  • a Search Console pages export (16 months)
  • GA4 landing pages (12 months)
  • backlinks (Search Console Links, plus Ahrefs/Semrush if you have them)
  • server logs, if available

Catch the WordPress-only URL types: /de/ translations, /category/…, /tag/…, /author/…, /page/2/, /feed/, date archives (/2024/05/), attachment pages, /?p=123 shortlinks, /amp/ (if you used AMP), and /wp-content/uploads/… images and PDFs. Some of those have backlinks and image traffic.

Step 2: Score each URL by clicks, referring domains and bookings/enquiries.

  • Tier A: the top ~100
  • Tier B: anything else with traffic or links
  • Tier C: no traffic, no links

Step 3: Decide an action for each URL.

  • Keep the same path. This is the best option: no redirect, just check content parity.
  • 1:1 redirect to the matching new page.
  • Merge. Several thin posts become one page, and all of them redirect to it.
  • Closest relevant page. A discontinued tour redirects to its replacement tour or its destination page, but only if that page truly serves the same need. If a discontinued tour has strong backlinks, you can instead keep it live (200) with a "no longer available" note and alternatives.
  • 410 when there's no relevant replacement.

Step 4: Mapping sheet columns old_url · lang · wp_type · status_now · clicks_16m · ref_domains · tier · action (keep / redirect / merge / 410) · new_url · owner · staging_result · notes

Step 5: Implement

  • Pattern rules in next.config redirects() cover many URLs in a few lines. Examples (adjust to your real permalinks):
    /:year(\d{4})/:month(\d{2})/:slug/  →  /blog/:slug/     (only if posts used date permalinks)
    /author/:slug/                      →  /authors/:slug/  (guess at the new path)
    /:path*/amp/                        →  /:path*/
    
    /tag/…, /category/… (unless mapped to a hub page) and /…/feed/ go to the 410 list.
  • The 1:1 list becomes redirects.json, read by middleware. The 410 list becomes gone.json.
  • /?p=123 shortlinks: middleware reads p and looks up legacy.wpId.
  • Image URLs with backlinks redirect to the new page or the Sanity image. The rest can 410.

Step 6: Migrate the content with parity

  • Import through the WordPress REST API (/wp-json/wp/v2/posts, pages, and the tour/destination post types if they have show_in_rest).
  • Yoast adds yoast_head_json (title, description, canonical, robots) to REST responses: import it into the seo fields. Rank Math needs its headless support setting turned on (plugin-dependent).
  • Convert HTML to Portable Text with htmlToBlocks from Sanity's block-tools package (the package name differs by version).
  • Rewrite internal links as references using the mapping sheet. Upload images with their alt text. Keep the published and modified dates, the authors and the EN ↔ DE links from WPML/Polylang. Store legacy.wpId/wpUrl.
  • Carry over the WordPress noindex settings, so pages like thank-you pages don't suddenly become indexable.

Step 7: Test on staging (with the bypass header)

  • Every old URL returns 200 (kept), a single-hop 301/308 to a 200 page, or a 410. No chains, and no 404s for Tier A or B.
  • Crawl staging: zero internal links to redirects or 404s, and canonicals and hreflang are correct.
  • Compare the Tier A pages old vs new: title, H1, word count, number of internal links, JSON-LD.

Step 8: Launch day

  • Avoid your peak booking weeks. For UK travel that is often January, but this is a guess, so check your own data.
  • Lower the DNS TTL a few days before, then point DNS to Vercel.
  • Run the old-URL test against production straight away.
  • Submit the new sitemap index in Search Console. No Change of Address is needed (same domain, guess 2).
  • Optional: submit a temporary sitemap of the old redirected URLs to speed up recrawling, and remove it after about a month.
  • Point ad final URLs at the new URLs.
  • Keep a full WordPress backup.

Step 9: After launch (8–12 weeks)

  • In the first week check daily, then weekly: the Search Console Pages report (Not found, Page with redirect, Duplicate canonical, Crawled – not indexed), crawl stats, and your 404 log. Add redirects as needed.
  • Track clicks and rankings for Tier A pages against your pre-launch baseline. Some movement in the first few weeks is normal.

4. Pre-launch checklist

Indexing and safety

  • Canonicals, og:url, sitemap URLs and hreflang all use https://www.example.org, never staging or *.vercel.app.
  • Production has no X-Robots-Tag: noindex (curl -sI https://www.example.org/ | grep -i robots returns nothing) and no noindex meta tag, except on landing pages and pages meant to be noindex.
  • Production robots.txt is the production version (no Disallow: /).
  • staging.example.org and preview URLs are protected (incognito test) and send the noindex header.
  • example.org, http:// and the *.vercel.app URL redirect to https://www.example.org/ or are protected/noindex.
  • Draft content never shows for a logged-out visitor, and the Sanity token isn't in the client bundle (search the build output for it).

Technical SEO

  • /robots.txt and /sitemap.xml return 200 directly, with no trailing-slash redirect.
  • Status tests pass: a fake URL → 404 (at root and under /de/); an unpublished slug → 404; 410 list → 410; /Tours/X/ → 308 to lowercase; a URL without the trailing slash → 308 to the slash version.
  • Exactly one canonical on all six templates, checked in the raw HTML.
  • Main content, title, description, canonical, hreflang and JSON-LD are in the raw HTML (check with curl or with JavaScript off).
  • hreflang pairs are reciprocal, x-default is present, and there are no hreflang links to noindex or redirected pages.
  • JSON-LD passes both validators, and tour prices match the page.
  • Sitemaps contain only 200, indexable, canonical URLs, and the counts per type match Sanity's count of indexable documents.
  • A crawl finds zero internal links to 404s or redirects, and no orphan tours or destinations.
  • Revalidation works: edit a tour title and the live page updates within a minute. Change a slug, and the redirect is created and the old URL returns 308.

Content

  • Tier A pages: SEO title, description, H1, body and internal links signed off in both languages.
  • Every image has alt text or is marked decorative.
  • Author pages are complete. Trust pages exist in both languages: about, contact, booking terms, privacy, an Impressum for German visitors (required by German law), and ABTA/ATOL details if they apply.

Performance

  • Mobile lab test for each template: LCP under 2.5 s, CLS under 0.1, low Total Blocking Time. Landing pages included.

Tracking

  • Search Console domain property (DNS-verified) and Bing Webmaster Tools ready. GA4/GTM and the consent banner work, and booking/enquiry conversions are tested.

Migration

  • 100% of old URLs tested: 200, a single-hop 301/308, or 410.
  • WordPress SEO data imported, ad final URLs ready to switch, DNS TTL lowered, WordPress backup taken, launch date outside peak booking weeks, team available for two weeks after launch.

5. Tickets grouped by team

P1 = before launch, P2 = soon after launch.

CMS developers (Sanity)

IDTicketDone whenPriority
CMS-01Reusable seo object + "SEO" field groupOn all page types, with the validation from section 1 (warnings for length, errors for slugs)P1
CMS-02Slug rulesCustom slugify (lowercase, umlauts), unique per type + language, max length; published slugs show "changing this creates a redirect"P1
CMS-03Document-level i18n@sanity/document-internationalization on all page types and site settings; EN ↔ DE linking worksP1
CMS-04Shared image type with altalt + decorative on every image, including in Portable Text; OG image size validatorP1
CMS-05Structured content fieldsTour (destinations, price, currency, duration, itinerary, status/replacement), Destination (parent, geo, FAQs), Author (jobTitle, sameAs, knowsAbout), Post (dates, author)P1
CMS-06Portable Text linksinternalLink reference annotation + externalLink with rel; no typed internal URLsP1
CMS-07Redirect document typeFormat, uniqueness, no-self and no-chain validationP1
CMS-08Auto-redirect on slug changeGROQ webhook (delta::changedAny(slug), before()/after()) creates the Redirect, fixes chains and handles child paths; tested on all typesP1
CMS-09Webhooks to the sitePublish/unpublish/delete → signed webhook to /api/revalidate; Redirect changes → Vercel Deploy HookP1
CMS-10Site settings singletonOrganization data, logo, default OG image, social profiles, membershipsP1
CMS-11WordPress import scriptPages, posts, tours, destinations, authors and images (with alt) imported; Yoast/Rank Math fields; legacy IDs; EN ↔ DE links; HTML → Portable Text; internal links → referencesP1
CMS-12Draft previewPresentation tool + Draft Mode on protected environments; token server-onlyP1
CMS-13"SEO issues" lists in the Structure toolGROQ-filtered lists: missing description, noindex on, canonical override set, missing translation, image without alt, tour without priceP2
CMS-14Character counters / SERP previewA custom input component (or a community SEO plugin) showing title and description lengthP2

Front-end developers (Next.js / Vercel)

IDTicketDone whenPriority
FE-01Routing + i18napp/[lang], English unprefixed via middleware rewrite, /en/* → 308, correct <html lang>, no automatic language redirectP1
FE-02resolveHref URL builderUsed by links, canonicals, hreflang, sitemaps, redirects and OG tags; unit-testedP1
FE-03URL normalizationtrailingSlash: true; lowercase and // rules in middleware; one redirect hopP1
FE-04Metadata helperbuildMetadata() for title, description, canonical, robots, hreflang and OG/Twitter; metadataBase from NEXT_PUBLIC_SITE_URL; no canonical in layoutsP1
FE-05Data layer + revalidationperspective: 'published', server useCdn: false, tags by type, generateStaticParams, signed /api/revalidate (old + new paths), null → 404 vs error → throwP1
FE-06Status codesnotFound() before Suspense; no loading.tsx on content routes; localized 404 pages; 410 via middleware; curl -I tests in CIP1
FE-07JSON-LD componentsOrganization/WebSite, TouristDestination, TouristTrip + Offer, BlogPosting, ProfilePage, BreadcrumbList with schema-dts and safe serialization; validators passP1
FE-08Redirect engineVercel domain redirect, next.config patterns, middleware maps (redirects.json, gone.json, ?p= lookup), Sanity redirects at buildP1
FE-09SitemapsIndex + per-type files, filter rules, real lastmod, revalidated on publishP1
FE-10robots + noindex safetyEnvironment-aware robots.ts; X-Robots-Tag on non-production hosts; Draft Mode and /studio noindexP1
FE-11Links + navigationnext/link everywhere, Portable Text link resolver, breadcrumbs, pagination links, language switcher to the real translationP1
FE-12ImagesSanity loader for next/image, alt, dimensions, sizes, LQIP, hero priorityP1
FE-13Core Web Vitalsnext/font, script strategies, non-blocking consent banner, client-island audit, lhr1/fra1 region, Lighthouse CI budgets, Speed InsightsP1
FE-14Landing page templatenoindex by default, not in the sitemap, not blocked in robots.txt, minimal JSP1
FE-15Vercel domains + protectionwww as primary, apex redirect, Deployment Protection on previews and staging, *.vercel.app handledP1
FE-16Pre-launch test scriptRuns the old-URL list and a crawl against staging with the bypass header; reports status, hops, canonical, robots, hreflang reciprocity, title/description lengthP1
FE-17404 monitoring404 paths logged and sent as a weekly reportP2

Editors

IDTicketDone whenPriority
ED-01Fill the URL mapping sheetEvery old URL with traffic or links has an action (keep / redirect target / merge / 410); Tier A reviewed by a personP1
ED-02SEO titles + descriptions for Tier AUnique and within limits in EN and DE; German written or reviewed by a native speakerP1
ED-03Content parity reviewTier A pages match or improve on WordPress: H1, body, FAQs, images, internal linksP1
ED-04Alt text auditEvery imported image has alt text or is marked decorativeP1
ED-05Tour and destination dataEvery active tour has price, duration, itinerary, destinations and FAQs; discontinued tours have a replacementP1
ED-06Author profilesBio, photo, job title, sameAs and expertise for every authorP1
ED-07Link translationsEvery German page linked to its English version; a list of pages with no translationP1
ED-08Editor trainingTeam knows: slug changes create redirects; when to use noindex; canonical override is rare; landing pages stay noindex; internal links go through the link pickerP1
ED-09Update ad final URLsAll ads point to new URLs, not redirects (launch day)P1
ED-10Post-launch checksWeekly Studio "SEO issues" lists and Search Console 404 review for 8 weeksP2

The prompt

First lines open so you can see how it is built. The rest opens after purchase.

the prompt · 500 words7 sections
#ROLE
You are a technical SEO architect who has launched many headless websites. Create a complete SEO setup plan for my headless build.

#INPUTS
Fill in every line. Leave a line blank if you don't know it.
- Website (or staging URL): [URL]
- Headless CMS: [e.g., Contentful, Sanity, Strapi, Storyblok, headless WordPress, Shopify Hydrogen]
- Front-end framework and rendering: [e.g., Next.js with SSG/ISR, Nuxt SSR, Astro]
Full prompt opens after purchase
Sections inside: #ROLE #INPUTS #KEY IDEAS #PROCESS #OUTPUT FORMAT #RULES #QUALITY CHECK

How to use it

  1. Buy, then open it in your account.
  2. Copy the prompt into ChatGPT, Claude or Gemini.
  3. Replace the 7 inputs with your product.
  4. Run it. Use the output. Re-run with a different tone if you like.

Pro tips

  • Build the SEO fields into the CMS content model on day one. Adding them later means editing every page twice.
  • Block preview and staging with a password and a noindex header, and check the header doesn't reach the live site.
  • Use the pre-launch checklist as a real gate before you switch DNS.

Before you buy

Will it work for my product?
Yes, if you can fill the 7 inputs. If the output is bad with your inputs, email us: we fix the prompt and refund you.
Do I download a file?
No. It lives in your account with a copy button, and updates when we improve it.
Which model is best?
Best on Claude. Works in ChatGPT, Claude and Gemini.

Works well with this

Prompts people use in the same campaign.

More in Ecommerce, CMS & JavaScript

See all in this sub-category

Buying more than two? Lifetime is cheaper.

Every prompt, every category, forever. $59 once. Nothing to download, nothing to renew.

Get lifetime · $59

This prompt

$3$7

  • ✓ Instant access in your account, with a copy button
  • ✓ Example input and real output included
  • ✓ 7-day money-back, no form

Or get every prompt, forever

Lifetime Access · $59 $149 — all categories, all future prompts, rewrites included.

Get lifetime access

Card or PayPal · taxes at checkout · nothing to download

Not the one you need?

Browse every prompt by category and sub-category.

Browse all prompts
Lifetime $59 →