Available for projects & agency overflow · Quick reply, from the person who does the work

Changing WordPress domain name without losing your rankings

Changing domain name touches the address stored in nearly every WordPress database table, the Search Console property, and every external link pointing at the old site. Without a precise method, some of the ranking value already earned gets lost needlessly.

Describe my issue Send a message

Why the old domain doesn’t just disappear with a DNS change

Redirecting DNS to a new domain name isn’t enough: the old domain stays wrapped inside the WordPress database, embedded in serialised PHP data strings used for theme settings, widget configuration and certain plugin options. Serialised data prefixes every piece of text it holds with its exact character length. If you replace the old domain’s text with the new one through a plain SQL query, without recalculating that length, the declared value no longer matches the actual text: WordPress can no longer read the data back, and the affected setting resets or disappears, sometimes with no visible error for days.

That’s why the fix goes through a tool that recalculates these lengths on every replacement, such as the WP-CLI wp search-replace command, run on both the old domain (while it stays temporarily live) and the new one, rather than a direct text edit in the database.

On a WooCommerce shop, this also covers product and category URLs, whose structure needs to stay identical on the new domain so each redirect remains a direct match rather than a generic one. I also regenerate the sitemap.xml with the new URLs before submitting it to Search Console, and check that no menu or widget still hardcodes a link to the old domain.

How I change domain name without losing rankings

  1. Replacing URLs on both sites

    I run wp search-replace on a copy of the site with the new domain, while keeping the old domain temporarily live so existing access isn’t cut off during the transition.

  2. Page-by-page 301 redirects

    I set up a 301 redirect from every old-domain URL to its exact equivalent on the new one, never a blanket redirect to the homepage, which dilutes ranking value instead of passing it on, and I avoid chains of multiple redirects that slow down indexing.

  3. Updating the Search Console property

    I add the new domain as a separate property in Search Console and submit its sitemap, without deleting the old property until the redirects are confirmed live.

  4. Reporting the address change

    Where the tool allows it, I use Search Console’s change-of-address feature, which explicitly tells Google how the old and new domains relate.

  5. Keeping the old domain live for several weeks

    I keep the old domain name registered and pointed at the redirects for several weeks at minimum, long enough for Google to crawl the new URLs and pass on the ranking value already earned.

Going further

Describe your need in one minute

A few targeted questions so I can reply with an estimate rather than another questionnaire.

origine
catalogue
extensions-premium (facultatif)
conserver (facultatif)
Please provide an email or a phone number so I can get back to you.

Please provide an email or a phone number so I can get back to you.

Frequently asked questions

Can I just redirect the whole old domain to the new homepage?
That’s not what I recommend: a blanket redirect to the homepage dilutes ranking value instead of passing it on. Every old-domain URL needs to redirect to its exact equivalent on the new one.
How long should I keep the old domain live?
Several weeks at minimum, long enough for Google to crawl the new URLs through the 301 redirects and pass on the ranking value already earned. Releasing it too soon cuts that transfer short.
Will changing domain crash my traffic?
A temporary dip during the reindexing period is normal. With 301 redirects correctly set up page by page and the old domain kept live, the impact stays limited and eases off gradually.
Should I create a new Search Console property or edit the existing one?
I create a separate property for the new domain and, where the tool allows it, use the change-of-address feature to explicitly tell Google how the two relate.
What happens to external links pointing at my old domain?
As long as the old domain stays live with its 301 redirects, those links keep working and pass their value on to the new address. One more reason not to release the domain too quickly.