Menu

Moving from WordPress to Next.js without losing rankings: the redirect routine
πŸ“°

Moving from WordPress to Next.js without losing rankings: the redirect routine

DEV Community: webdevΒ·Sushil BarwalΒ·about 6 hours ago
#DyD0ZTV4
#devtowebdev#devto#dev#next#redirect
Long article (1310 words) β€” no AI summary yet.
Reading 0:00
15s threshold

Moving a business site from WordPress to Next.js is usually a good trade: faster pages, a cleaner codebase and fewer plugin updates. The part that goes wrong is not the build. It is the old URLs. Google has years of signals attached to /services/plumbing-repairs/ and /2021/04/how-much-does-a-boiler-cost/ , and if those paths start returning 404 on launch day, the rankings and the backlinks pointing at them go with them.

This walkthrough is the redirect routine we use: export every old URL, build a redirect map, decide what to do about trailing slashes, and test every line before the DNS switch.

1. Export every old URL before you touch anything

Do this while the WordPress site is still live. You want three lists, merged and de-duplicated:

The XML sitemap. WordPress has shipped a core sitemap at /wp-sitemap.xml since version 5.5. If Yoast or Rank Math is active, theirs is usually at /sitemap_index.xml . Each is an index that points to per-type sitemaps (posts, pages, categories).

Google Search Console.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.