Endpoint.Media

Technical SEO

The Website Migration Blueprint: Rebuild on Next.js Without Destroying Search Traffic

Published · 14 min read

Enterprise website migrations fail when teams treat SEO as a launch-day checkbox. Indexation loss, redirect chains, and canonical conflicts destroy years of link equity in 48 hours. This is the safe website migration checklist we execute on every Next.js rebuild.

Phase 1: Pre-Migration Audit

Export every indexed URL from Google Search Console Coverage report. Crawl with Screaming Frog or Sitebulb. Document current rankings for top 50 queries. This baseline is your insurance policy — any post-launch traffic drop gets traced to a specific URL mapping failure.

Migration Checklist

  • Export all URLs from GSC + Screaming Frog
  • Map 301 redirects in next.config.mjs
  • Validate canonical tags on every route
  • Deploy sitemap.ts with lastModified dates
  • Submit updated sitemap in Search Console
  • Monitor 404 spike for 14 days post-launch

Phase 2: 301 Redirect Mapping

Every legacy URL must map to exactly one canonical destination with a 301 permanent redirect. Avoid chains (A→B→C). Implement in next.config.mjs redirects array or middleware. Test every mapping with curl -I before DNS cutover.

next.config.mjs redirects
async redirects() {
  return [
    { source: '/old-services', destination: '/services', permanent: true },
    { source: '/blog/:slug', destination: '/blog/:slug', permanent: false },
  ];
}

Phase 3: Dynamic Sitemap Architecture

Next.js sitemap.ts programmatically generates XML from your route registry. Set accurate lastModified dates per content type. Submit to Google Search Console within 24 hours of launch. Use IndexNow API for Bing instant notification.

Phase 4: Post-Launch Monitoring (14 Days)

  • Daily GSC Coverage report — watch for spike in "Page with redirect" or "Not found"
  • Compare organic sessions week-over-week in GA4
  • Validate canonical tags on all migrated URLs
  • Re-submit sitemap if new blog/content routes added

Book a migration consultation · Redesign services