Most of the SEO risk in a headless replatform is avoidable. Search engines index the HTML your storefront returns; they neither know nor care whether Shopify or a Next.js app on Medusa generated it. Rankings drop when the migration breaks something search engines were relying on: a URL, a redirect, a piece of structured data, or server-side rendering itself.
Here is the sequence that keeps traffic flat through the cutover.
1. Inventory every indexed URL before you touch anything
Pull the full list from three sources and reconcile them:
- Google Search Console: the Pages report and the Performance report (every URL that has had an impression in the last 12 months).
- A full crawl of the live site (Screaming Frog, Sitebulk, or similar).
- Server logs for the last few months: the URLs Googlebot actually requests, including ones not linked anywhere anymore.
The output is a spreadsheet: old URL, page type, current title, current meta description, indexed (yes/no), monthly clicks. This is the document the whole migration is checked against.
2. Decide URL parity, one type at a time
For anything you do change, say flattening /blogs/news/<article> to
/blog/<article>, the rule is a one-to-one 301 redirect from old to new,
served at the edge (Next.js middleware or your CDN) so it is fast and
independent of the app. No redirect chains, no redirects to the homepage, no
302s.
3. Reproduce metadata and structured data exactly
Go page type by page type and match what Shopify was emitting:
<title>and<meta name="description">: same formula, same length.- Canonical tags: self-referencing on the canonical URL, pointing away from faceted and paginated duplicates.
- Open Graph and Twitter tags.
- Structured data:
Productwithoffers,AggregateRating, andReviewon product pages;BreadcrumbListeverywhere;OrganizationandWebSiteon the homepage. Validate every type in the Rich Results Test. MissingProductmarkup is one of the most common causes of a post-migration drop in rich result impressions. hreflang, if you run multiple locales.
4. Render on the server
Product, collection, and content pages must return complete HTML on the first response, not a shell that fetches data client-side. In Next.js that means these routes are statically generated or server-rendered, with the commerce API called during render. Reserve client components for genuinely interactive pieces (cart, search-as-you-type, variant selectors).
Planning a Shopify Plus replatform?
We run the SEO workstream in parallel with the build: URL map, redirect layer, structured-data parity, and a crawl diff on staging before anyone flips DNS.
Talk to us →5. Validate on staging with a real crawl
Before cutover, crawl the staging site and diff it against the live-site crawl from step 1:
- Every old URL resolves, directly or via exactly one 301 to a live 200.
- Titles, descriptions, canonicals, and H1s match the intended values.
- Structured data validates on every template.
robots.txtallows what it should and the XML sitemap lists every live URL with correctlastmod.- No
noindexleft over from staging protection. This one has sunk more migrations than any other single mistake: the staging site isnoindex, and the tag ships to production.
6. Cutover, then watch
On the day: deploy, remove staging's noindex/auth, submit the new sitemap in
Search Console, and use the URL Inspection tool to request indexing on the
top 20 pages by traffic.
For the next month, watch the Search Console Pages report for a spike in "Not found (404)" or "Redirect error", Crawl stats for a fall in pages crawled per day, and the Performance report for query-level drops. Keep the old-site crawl and the redirect map on hand so you can trace any 404 back to where it should point.
Why headless can help SEO
Once the migration is clean, you are in a better position than before: you control server response times, bundle size, image formats, and Core Web Vitals directly, instead of negotiating with a theme. A well-built headless storefront is typically faster than the Shopify theme it replaced, and speed is one of the few ranking factors you can move with engineering alone.
The replatform is not the risk. Skipping the URL map is.