The Redirect Map That Protects WordPress Rankings
Most WordPress domain migration guides stop at moving files and databases. What actually protects your rankings is the redirect map: a systematic old-URL to new-URL plan, plus the canonical and internal link sweep most plugins skip.

How to migrate WordPress to a new domain without losing the rankings you've spent years building starts with one document most tutorials skip: the redirect map. Everything else — plugins, database exports, DNS — is execution. The map is the plan. Here's how to build it, implement it, and sweep the places WordPress hides absolute URLs so a domain move doesn't quietly break your site.
How to Migrate WordPress to a New Domain: Build the Redirect Map First
If your URL structure stays identical, the entire redirect map collapses to a single server rule. If you're redesigning slugs, taxonomies, or the content model at the same time, you need a line-by-line table. Either way, you decide the mapping before the move — retrofitting 301s after Google has already recrawled is how rankings fall through the cracks.
Page type | Old URL | New URL | Redirect |
|---|---|---|---|
Homepage | olddomain.com | newdomain.com | 301 |
Blog post | olddomain.com/blog/guide-to-seo/ | newdomain.com/blog/guide-to-seo/ | 301 (path preserved) |
Custom post type | olddomain.com/portfolio/case-study/ | newdomain.com/work/case-study/ | 301 (structure changed) |
Media | olddomain.com/wp-content/uploads/2024/photo.jpg | newdomain.com/wp-content/uploads/2024/photo.jpg | 301 (path preserved) |
Anything else | olddomain.com/whatever/ | newdomain.com/whatever/ | Catch-all rule |
The rule of thumb: keep permalinks identical unless you have a reason to change them. The migration itself is hard enough; changing URL structure at the same time turns one sweep into two, and every changed slug is a place for a redirect to get missed.
Why the Redirect Map Protects Rankings During a Domain Move
URL-level 301s are the only reliable way to carry link equity across a domain move. A single wildcard redirect that dumps every old URL onto the new homepage does not transfer per-page authority — and Google's change-of-address tool works best when individual URLs resolve cleanly to their replacements.
Search engines treat each 301 as a signal that "this page has permanently moved." When a page doesn't map to an equivalent, that signal disappears, and so does the page's standing. Yoast's migration checklist exists precisely because a domain move without per-URL redirects is one of the few self-inflicted SEO wounds that's genuinely hard to undo. Redirects also need to be 301, not 302 — a temporary redirect tells crawlers to keep the old URL indexed, which defeats the entire move. Kualo's zero-downtime guide gets the sequence right: update the WordPress address and site URL in the new install, move the files, and keep the old domain serving redirects rather than a dead page.
Canonicals and the Internal Link Sweep Plugins Skip
After you migrate WordPress to a new domain, WordPress regenerates canonical URLs from the new siteurl — but only the ones it controls. Anything hardcoded stays pointed at the old domain: custom canonical tags, XML sitemap entries, menu items, widget content, and the absolute URLs embedded in post bodies and image src attributes.
That's the part a file-and-database clone does not fix. Delicious Brains' WP Migrate exists because WordPress stores URLs inside serialized PHP arrays — replacing the domain with a raw SQL query corrupts the length prefixes and silently breaks widgets, settings, and sometimes entire pages.
So the post-move sweep is three things: (1) canonical and meta tags, (2) internal links in content and menus, (3) media URLs. Plugins like Duplicator, Backup Migration, and All-in-One WP Migration are the common starting points, but we've catalogued where each of the six popular migration plugins chokes on exactly this — some quietly leave absolute URLs behind, and you won't notice until a crawler flags 404s on images or a canonical still points at the old domain.
Search Console Change of Address: After the 301s, Not Before
File the change of address only after your 301s are live and verified. Doing it before gives Google a signal with nothing to validate against, and the new domain can get indexed before the old domain's redirects exist — creating the exact duplicate-content confusion you're trying to avoid.
The right order: verify the new domain in Search Console, keep a temporary noindex on the new site while you build — Yoast's step of adding a robots.txt that blocks indexing — then cut over, verify the redirects, and only then file the change of address. The temporary noindex prevents Google from discovering the new domain's duplicate content before redirects exist. Remove it in the same breath you file the change of address.
Implementing 301s: The Base Rule Plus Mapped Exceptions
Use a server-level rewrite as your base, then layer mapped exceptions on top. The order matters: long, specific paths before the catch-all.
# .htaccess on the OLD domain's server
RewriteEngine On
# 1. Mapped exceptions — structure changed
RewriteRule ^portfolio/(.*)$ https://newdomain.com/work/$1 [R=301,L]
RewriteRule ^blog/old-slug/$ https://newdomain.com/blog/new-slug/ [R=301,L]
# 2. Catch-all — path preserved
RewriteCond %{HTTP_HOST} ^(www\.)?olddomain\.com$ [NC]
RewriteRule ^(.*)$ https://newdomain.com/$1 [R=301,L]If both sites share a host, declare the rules there. If the old domain is being retired from its old host, keep that host alive as long as you reasonably can — the same zero-downtime logic Kualo applies to the DNS TTL cutover applies after the switch: an old server still serving 301s is worth more than a parked page.
The Migration Sequence That Doesn't Drop Rankings
The order protects the rankings. Skipping a step — usually the sweep or the verification — is what turns a routine migration into a months-long recovery.
- Take a full backup of the old site. Both Learn WordPress sources and Yoast list this as step one.
- Build the redirect map. Decide every old-URL to new-URL pairing before touching DNS.
- Clone to the new domain and run a serialized-safe domain replacement with WP Migrate or an equivalent that understands PHP serialization.
- Sweep canonicals, internal links, and media URLs for leftover old-domain strings.
- Put the new domain behind a temporary noindex using Yoast's robots.txt step.
- Test the new domain via a hosts-file entry or staging before the DNS cutover.
- Lower the DNS TTL, then switch DNS, following Kualo's zero-downtime approach.
- Activate the 301 rules on the old domain.
- Verify redirects with
curl -Ion a sample of URLs from the map. - Remove the noindex and file the change of address in Search Console.
If this reads like a full-time project, that's because it is. We run WordPress migrations where the redirect map is the first deliverable, not an afterthought — so the move and the SEO handoff happen in the same pass.
FAQ
Does migrating WordPress to a new domain affect SEO?
Short-term ranking fluctuation is common, but a clean URL-level 301 redirect map carries the bulk of link equity and stabilizes rankings within weeks. The permanent damage happens when old pages are redirected to the homepage instead of their new equivalents.
Do I need to update the WordPress Address and Site URL after the move?
Yes. WordPress stores the domain as siteurl and home in the database, and Settings -> General must reflect the new domain. Use a serialized-safe search-replace tool for any other copies of the domain hiding in content, widgets, and options.
How long should I keep the old domain's 301 redirects active?
Indefinitely, or at minimum 12-18 months. Backlinks and bookmarks will keep hitting the old domain for years, and every redirect you remove re-breaks those paths and burns the equity they carried.
What's the safest way to replace the domain in the WordPress database?
Use a migration plugin or WP-CLI search-replace with serialized-array support rather than a raw SQL replace. Naive find-and-replace corrupts PHP serialized strings and silently breaks widgets, settings, and post metadata.