how to change wordpress domain name without losing seo - featured image

How to Change WordPress Domain Name Without Losing SEO Fast

If you’re looking up how to change WordPress domain name without losing SEO, you’re probably about to rebrand, or you’ve already switched and watched your traffic drop off a cliff. Rankings that took years to earn can disappear in a week. For a store, that means empty carts and a lot of panic. The good news is that almost every SEO loss after a domain change comes from a few predictable mistakes, and you can find and fix each one.

See how our Website Migration service handles this →

Quick answer: Move the site to the new domain and replace every old URL in the database. Then add one 301 redirect from each old URL to its exact new match. Keep the old domain registered, verify the new one in Google Search Console, submit a new sitemap and file a Change of Address.

How to change WordPress domain name without losing SEO: get the 301 redirects right

During a move, most of your ranking value depends on redirects. Google treats a permanent (301) redirect as a strong sign that a page has moved for good, so it passes the old page’s authority to the new address. If the redirects are wrong, Google sees thousands of dead pages instead of moved ones.

The symptom

Traffic drops sharply within days of the switch. In Search Console, the old property shows a spike in “Not found (404)” pages. Visitors who click old links in emails or on social media land on an error page.

Why it happens

  • There’s no redirect at all, because the old hosting account was cancelled.
  • Every old URL redirects to the new homepage instead of to its matching page.
  • The redirect is a temporary 302, which hosting panels and some plugins often set by default.

How to check it

Open a few old URLs in a private browser window: a product, a category, a blog post and an image. Each one should land on the same path on the new domain. To see the status code, open your browser’s developer tools, go to the Network tab and confirm the first response is a 301, not a 302.

How to fix it

  1. Keep the old domain registered and pointed at a server for at least a year. Ideally, never let it lapse.
  2. On the old domain’s server, add a redirect rule to the .htaccess file (on Apache or LiteSpeed) that keeps the path. The rule catches every request and sends it, with a 301, to the same path on the new domain.
  3. If you also changed slugs or your permalink structure, add a separate rule for each affected page, because a domain-wide rule can’t guess the new slugs.
  4. Test again with ten or twenty real old URLs, including some with query strings.

Old URLs still hard-coded in the database

Changing the Site Address in Settings only updates two values. The old domain is still stored in thousands of other places: post content, image paths, menus, widgets, page-builder data and WooCommerce settings.

The symptom

Pages load, but images are broken, internal links send visitors through the redirect, and some pages show mixed-content warnings. Google keeps crawling the old domain because your own site keeps linking to it.

Why it happens

WordPress stores full URLs, domain included. Many themes and builders also save settings as serialized data, which records the length of every text string. A plain find-and-replace in a SQL file changes the text but not the recorded length, and that silently breaks those settings.

How to check it

View the page source on a few key pages and search for the old domain. If you have WP-CLI access, a dry run of the search-replace command shows how many rows in each table still contain it.

How to fix it

  1. Take a full backup first. If anything goes wrong, our guide on restoring a WordPress site from backup shows you how to get back to a safe point.
  2. Use a replacement method that understands serialized data. Run WP-CLI’s wp search-replace with the --dry-run flag first, or use a reputable search-and-replace plugin.
  3. Replace the full address including the protocol, for example https://oldshop.com to https://newshop.com. If both the www and non-www versions were in use, run a second pass for the other one.
  4. Clear every cache: your caching plugin, the server cache and the CDN.

On large stores, the replacement can run out of memory partway through. If you see a fatal error, our memory exhausted error fix explains how to raise the limit safely before you try again.

Google was never told about the move

Google will work out the move from the redirects eventually. Telling it directly, though, makes the transfer much faster and shortens the period when rankings jump around.

The symptom

Weeks after the move, Google still shows the old domain in search results. The new property in Search Console shows very few indexed pages.

How to check it

Log in to Search Console and check that both domains are added and verified. Then look in the old property’s settings to see whether a Change of Address has been completed.

How to fix it

  1. Add and verify the new domain. A Domain property verified with a DNS record is best, because it covers every version of the domain.
  2. Submit the new XML sitemap in the new property.
  3. In the old property, go to Settings and then Change of Address, and select the new domain. This only works once your 301 redirects are live, because Google tests a sample of them.
  4. Keep both properties. Watch the old one for 404 spikes and the new one for indexing growth.

Read Google’s guide to site moves with URL changes once before you start. The section on matching old URLs to new ones is especially useful.

Redirect chains, HTTPS and www mismatches

Every extra step in a redirect costs a little loading time and a little trust. Domain changes tend to pile these steps on top of each other without anyone noticing.

The symptom

Old links take a noticeable moment to load. Speed scores drop, and Search Console reports more “Redirect error” or “Page with redirect” entries than you’d expect.

Why it happens

A typical chain looks like this: http://oldshop.com goes to https://oldshop.com, then to https://www.oldshop.com, then to https://newshop.com, and finally to https://www.newshop.com. That’s four redirects for one click. And if the new domain’s SSL certificate wasn’t installed before the switch, browsers show a security warning and Google stops crawling.

How to fix it

  • Before you start, choose one final version of the address (https, with or without www) and set it as both the WordPress Address and the Site Address.
  • Write redirect rules so every version of the old domain goes straight to the final new URL in a single redirect.
  • Install and test the SSL certificate on the new domain before you point DNS to it.
  • Keep a valid certificate on the old domain too. Otherwise, https links to the old site fail with an error before the redirect can run.

Canonicals, sitemaps and a forgotten noindex

Your SEO plugin tells Google which URL is the main version of each page, through what’s called a canonical tag. After a move, it can keep pointing Google at the wrong address.

The symptom

New pages get crawled but not indexed, or Search Console reports “Alternate page with proper canonical tag” pointing at the old domain. In the worst case, traffic disappears completely because the whole site is set to noindex.

Why it happens

  • The site was built or tested on a staging copy with “Discourage search engines from indexing this site” ticked, and that setting came along with the move.
  • Canonical URLs or sitemap entries were cached or saved with the old domain in them.
  • A robots.txt file left over from staging blocks the whole site.

How to fix it

  1. Go to Settings, then Reading, and make sure the “Discourage search engines” option is unticked.
  2. View the source on a few pages and confirm the canonical tag shows the new domain.
  3. Open /robots.txt and your sitemap on the new domain and check that both use the new address.
  4. Regenerate the sitemap in your SEO plugin, then resubmit it in Search Console.

WooCommerce and third-party connections left behind

For a store, SEO is only half the story. A domain change can quietly break the parts of your business that turn visits into orders.

The symptom

Orders stay stuck on “Pending payment”, order emails land in spam or never arrive, and shopping ads get rejected because the URL doesn’t match.

Why it happens

Payment gateways send webhooks, automatic notifications about each payment, to a specific URL. Email delivery relies on SPF and DKIM records set up for a specific domain. Your product feeds, analytics and ad accounts all still have the old domain saved in their settings.

How to fix it

  • Update the webhook URLs in your payment provider’s dashboard, then make a test payment.
  • Add SPF, DKIM and DMARC records for the new domain. Then send a test order email to a Gmail address and an Outlook address.
  • Update the domain in Google Merchant Center, your analytics property, your ad accounts and your Google Business Profile.
  • Check your plugin licences. Many are tied to the site URL and stop updating after a move.

Backlinks and brand mentions still pointing to the old domain

Redirects pass on most of the value from your backlinks, but a direct link is always stronger than a redirected one. And if the old domain ever expires, all of those links break at once.

How to fix it

  1. Export your top linking sites from the Links report in the old Search Console property.
  2. Update every link you control yourself: social profiles, directory listings, supplier pages and email signatures.
  3. Politely ask your ten to twenty most valuable linking sites to update their links.
  4. Set the old domain to auto-renew so it never lapses.

Symptom, cause and fix at a glance

Symptom after the moveLikely causeQuick fix
Traffic drops sharply and old links show 404No redirects, or the old hosting was cancelledRestore hosting for the old domain and add a 301 redirect that keeps each path
Every old link lands on the homepageEverything redirects to the homepageRedirect each old path to its matching new path
Broken images and mixed-content warningsOld URLs left in the databaseRun a search-replace that handles serialized data, then clear caches
New pages crawled but not indexedCanonical tags or the sitemap still use the old domainRegenerate the sitemap and check canonical tags
Traffic close to zeroA noindex setting or blocking robots.txt came over from stagingUntick “Discourage search engines” and fix robots.txt
Slow redirects and redirect errors in Search ConsoleRedirect chains or a missing SSL certificateUse single-step redirects and keep certificates on both domains
Orders stuck on “Pending payment”Payment webhooks still use the old domainUpdate the webhook URLs and make a test payment

When to call in a pro

If you’ve worked through this list and still can’t see why your traffic dropped, or you’d rather not experiment on a live store, it’s a good time to hand the job over. A domain change touches DNS, the server, the database and every integration at once, and one wrong step can take your checkout offline.

Our WordPress website migration service handles the whole move for you:

  • We move your files, database, emails and SSL.
  • We check the new copy on staging before the switch.
  • There’s zero downtime: we sync the site twice and switch DNS at a quiet hour.
  • It starts from $110, and the job is fixed or refunded.

Already moved and not sure what went wrong? Describe the problem on WhatsApp and we’ll reply with a no-obligation quote.

Not sure which fix you need? Send us your store.

Leave your name and what is happening on WhatsApp — we diagnose it, talk it through and send you a quote. No obligation, no jargon.

Message us on WhatsApp

Frequently asked questions

Will I lose rankings when I change my WordPress domain?

Expect your rankings to dip for a short time, usually a few weeks, while Google processes the redirects. With a 301 for every page, updated internal links and a Change of Address, most sites settle back to similar rankings. A large drop that lasts almost always means a step was missed.

How long should I keep the old domain?

Keep it for at least a year, and ideally forever. The old domain carries your backlinks and branded searches, and renewing it costs far less than losing that value. Set it to auto-renew and leave the redirects running.

Can I change the domain and the permalink structure at the same time?

You can, but it adds risk, because a simple domain-wide redirect rule no longer matches old paths to new ones. If you have to do both, make a full list matching each old URL to its new one and redirect every page individually. Otherwise, change the domain first and change the structure later.

Do I need to move hosting to change the domain?

No. You can point a new domain at the same hosting account and update WordPress where it is. The steps in this guide apply either way, because the database, redirect and Search Console work is the same.

Is it safe to update PHP or plugins during the move?

Do them separately. Move the domain on your current setup, confirm everything works, then do the upgrades. If an upgrade is due anyway, our guide on how to update PHP version in WordPress covers doing it safely afterwards.

Similar Posts