How to move WordPress to a new domain without losing SEO

To move WordPress to a new domain without losing SEO, copy the site to the new domain, replace every old URL in the database, redirect every old URL with a 301 to the same path on the new domain, then tell Google with the Change of Address tool in Search Console. The redirect map is the part that protects your rankings: each old URL must land on its exact equivalent in one hop.

Expect some ranking movement for a few weeks while Google recrawls both domains. Keep the old domain registered and redirecting for at least a year, and ideally for good.

Step by step

1. Crawl and record the old site

Before touching anything, save a list of every indexable URL. Your sitemap is the easiest source: open it from Hydrogen SEO → Sitemap → View Sitemap and save each child sitemap. Also export the top pages from Search Console's Performance report so you can check the most valuable URLs by hand after the move.

2. Copy the site to the new domain

Point the new domain at your hosting, install an SSL certificate, and copy files and database there, or change the domain of the existing install. Do not change permalinks, slugs or site structure during the move. One change at a time makes problems traceable.

3. Replace URLs in the database safely

WordPress stores serialized data, so a plain SQL find-and-replace can corrupt settings. Use WP-CLI, which handles serialization:

bash
wp search-replace 'https://old-example.com' 'https://new-example.com' --all-tables --dry-run
wp search-replace 'https://old-example.com' 'https://new-example.com' --all-tables

Run the dry run first and read the counts. This updates Settings → General site addresses, links inside content, and plugin settings. Then open Settings → Permalinks and click Save Changes to flush rewrite rules.

4. Redirect old URLs, path for path

Every old URL must 301 to the same path on the new domain: old-example.com/blog/post/ to new-example.com/blog/post/. Set this at the server, host or CDN, on the old domain, so it works even without WordPress running there. On Apache:

apache
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?old-example\.com$ [NC]
RewriteRule ^(.*)$ https://new-example.com/$1 [R=301,L]

Hydrogen SEO's Redirection Manager works on paths within one site, so it suits individual URL changes, not a whole-domain rule. Do not redirect everything to the new homepage; that loses the page-level signals.

5. Test the redirects

Check a sample of old URLs, including the top pages you exported, with:

bash
curl -sI https://old-example.com/blog/post/ | grep -i -E '^(HTTP|location)'

You want 301 and a Location on the new domain with the same path, in a single hop. Check the http and www variants of the old domain too, since each should reach the final URL directly rather than through a chain.

6. Update what the site outputs

View source on the new domain and confirm canonicals, Open Graph URLs, schema and the sitemap all use the new domain. Hydrogen SEO builds these from your site address, so they follow automatically once the database is updated. Confirm new-example.com/robots.txt does not block crawling and that Discourage search engines is unchecked.

7. Tell Google and submit the new sitemap

In Search Console, open the old domain's property, go to Settings → Change of address, choose the new property and run the checks. The tool requires working 301s from the old homepage and verified ownership of both. Then submit the new sitemap in the new property. Do the same move in Bing Webmaster Tools, which has its own site move tool.

8. Monitor for several weeks

Watch both properties. The old property's Page indexing report should show URLs moving to "Page with redirect", which is expected. The new property should show indexed pages rising. Check your top pages weekly, and ask sites that link to you most to update their links.

Check it worked

In the new property, the Pages report should show indexed pages climbing over the following weeks, and URL Inspection on your top pages should report URL is on Google with the new URL as the Google-selected canonical. In the old property, indexed pages fall as URLs move to "Page with redirect". Compare total clicks across both properties with the weeks before the move. A temporary dip is common; a lasting drop on specific pages usually means their redirect is missing or points somewhere else, so test those URLs first.

What not to do

  • Do not let the old domain expire. Redirects stop working and someone else can buy it.
  • Do not combine the move with a redesign or URL change. You will not know which change caused a drop.
  • Do not block the old domain in robots.txt. Google must crawl the old URLs to see the redirects.

Common questions

How long does it take Google to process a domain move?

Most signals move within weeks, but it varies with site size and crawl rate. Keep redirects for at least a year.

Can I use the Change of Address tool for an http to https move?

No. It is for moving to a different domain. Protocol and www changes only need 301 redirects.

Will I lose rankings when changing domains?

Some temporary movement is normal. Path-for-path 301s, unchanged content and a submitted Change of Address keep the loss small and short.