Why redirects are the hardest part of migrations
URLs are the contract between your site and the rest of the web. Every backlink, every bookmark, every old SERP entry points to a URL. Change the URL without a redirect and you break the contract. Most migration traffic losses come from broken or missing redirects, not from technical bugs in the new platform.
301 vs 302: get it right
301 (Moved Permanently) tells the crawler to transfer ranking signals to the new URL and update its index. 302 (Found, temporarily moved) tells the crawler the move is temporary and to keep the old URL indexed. For migrations, you almost always want 301. Using 302 by mistake (a common framework default) means months of zero ranking transfer.
The redirect map
Before any migration, build a complete redirect map — every legacy URL mapped to its new URL. For sites under 10k URLs, a spreadsheet works. For larger sites, a database with a lookup at the edge. The map is the source of truth — every URL change in the migration must be in the map before launch.
Redirect chains: the silent killer
Every redirect adds latency and dilutes ranking signals. Two redirects in a row (301 → 301) lose more signal than a single direct redirect. Audit for chains in CI — every old URL should redirect directly to its final destination, never via an intermediate URL.
Wildcard redirects: useful but dangerous
Wildcard rules (everything under /old-section/* goes to /new-section/$1) save engineering time but can mask broken redirects. Use them for predictable transformations and explicit redirects for exceptions. Audit the wildcard output URLs to verify they all resolve.
Soft 404s: the redirect trap
Redirecting an old URL to a generic page (homepage, category) instead of the equivalent new URL creates a soft 404 — the URL technically returns 200, but the content has no relevance to the original. Google treats soft 404s as broken and drops the ranking signal. Always redirect to the closest equivalent page, not the homepage.
Monitoring after launch
After migration, monitor 404 errors in your access logs daily for 30 days. Every 404 is either a missing redirect (fix it) or a legitimate dead URL (delete from sitemap, leave 404). The first month after launch is when your redirect map gets stress-tested by every old URL on the web. Be ready to ship fixes daily.