Quick answer
To change a WordPress domain name without losing SEO, add the new domain to your hosting with SSL, run a serialized-safe search-and-replace on the database, then 301 redirect every old URL to the same path on the new domain. Use Google Search Console's Change of Address tool, update every outside service that still points at the old name, and keep the old domain registered and redirecting for at least a year.
Changing a domain is a different job from changing hosts. In a host move the address stays the same and only the server behind it changes, which is why a careful host move is invisible to Google. In a domain change the address itself changes. Every link anyone ever built to your site, every bookmark and every search result points at a name you are about to stop using.
The fix is old and well documented: permanent redirects from each old URL to its new twin. Most of the damage we see after a domain change comes from skipping that page-level detail or from letting the old domain lapse a year later.
Is a Domain Change Worth It?
Some reasons justify the disruption. A rebrand where the old name no longer describes the business. A merger where two sites become one. A trademark dispute. Moving from a hard-to-spell or hyphenated name to one customers can type from memory. Buying the .com version of a name you were running on a different extension.
Other reasons rarely pay for themselves. Adding a keyword to the domain for SEO does very little on its own, and you take on a recovery period to get it. A slightly shorter name is nice but seldom worth a migration. If you are still choosing a name, our guide on how to choose a domain name covers what matters, and .com vs. other extensions covers the extension question.
One more distinction before you start. Moving your domain to a new registrar is a domain transfer, and it changes nothing about your site's address. That process is in our domain transfer guide. This article covers changing the address itself.
Before You Touch Anything
- Register the new domain and keep the old one. The old domain has to stay registered and pointed at your server for the redirects to work. Turn on auto-renew for it now, before it slips anyone's mind.
- Take a full backup. Files and database, downloaded somewhere other than the server. A search-and-replace that goes wrong is far easier to undo from a backup than by hand.
- Export a list of every URL. Pull the URLs from your XML sitemap, plus the pages with the most clicks and links from Search Console. This list becomes your redirect test sheet later.
- Freeze other changes. Keep page slugs, page content and the menu structure exactly as they are. One variable at a time.
- Pick a quiet window. The switch itself takes minutes, but give yourself a few hours of low traffic to test before customers arrive.
The Move, Step by Step
1. Add the new domain to your hosting
Point the new domain's DNS at your server and add it to your hosting account, either as the primary domain or as an alias of the existing site. Install an SSL certificate for the new domain before WordPress ever answers on it, so the first version Google crawls is already on HTTPS.
2. Update the database
WordPress stores its own address in two settings, the WordPress Address and the Site Address under Settings, General. Changing those two fields is necessary but nowhere near enough. Your posts, widgets, page-builder layouts and plugin settings all contain the old domain in full.
Run a search-and-replace across the database with a tool that understands serialized data. Plain SQL find-and-replace corrupts serialized values, because the stored length of each string no longer matches. With WP-CLI, run a dry run first:
wp search-replace 'https://oldname.com' 'https://newname.com' --all-tables --dry-run
Read the count of replacements per table. If the numbers look sensible, run it again without --dry-run. Search for the www and http:// versions of the old address as well, since older content often contains all of them.
3. Clear every cache
Page caches, object caches and any CDN in front of the site still hold pages that reference the old domain. Purge all of them, then load the new domain in a private browser window.
4. Turn on the redirects
With the site answering correctly on the new domain, switch the old domain over to redirects. The next section covers how.
5. Test the money paths
Submit the contact form and confirm the email arrives. Place a test order if you run a store. Log in and out. Check that images load from the new domain, not the old one, by viewing the page source.
Redirects That Keep Rankings
Google's developer documentation on site moves recommends server-side permanent redirects, such as 301 or 308, from each old URL to its equivalent on the new domain. The important word is equivalent. oldname.com/services/roof-repair should land on newname.com/services/roof-repair, not on the new homepage.
Redirecting everything to the homepage is the most common way a domain change loses traffic. Google's site-move guide warns against sending many old URLs to one unrelated destination such as the homepage, and says such redirects might be treated as soft 404 errors. The ranking history of those inner pages goes with them.
Because your paths are not changing, one rule handles every page. On an Apache server, with the old domain still pointed at the same hosting account, this goes at the top of the old domain's .htaccess:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?oldname\.com$ [NC]
RewriteRule ^(.*)$ https://newname.com/$1 [R=301,L]
Server-level redirects are better than a plugin here because they fire before WordPress loads, so they keep working even if the site on the old domain is later removed. Test them with your URL list: each old address should return a single 301 to the matching new address. A chain of two or three hops is worth fixing.
Telling Google About the Move
Verify the new domain in Google Search Console, then submit its XML sitemap. Next, open the old property and use the Change of Address tool. Google's help page lists the requirements:
- You must own both the old and new properties, managed from the same Google account.
- The tool works at the domain level only, and it does not move subdomains, including
www, on its own. - The old homepage must already 301 redirect to the new homepage. The tool checks a few pages for 301s before it accepts the request.
According to the same page, Google keeps forwarding signals from the old site for 180 days after you start the move. Google's guidance also says to expect temporary fluctuation in rankings during the move, and that a small to medium-sized site can take a few weeks for most pages to move. A dip in the first weeks is normal. A dip that is still growing after a month usually points at broken or missing redirects.
Everything Outside WordPress
The site is only part of the job. These usually still point at the old name after the switch:
- Email addresses. Decide whether staff move to new addresses. Keep the old mailboxes receiving, or forwarding, for months, and update the SPF and DKIM records for whichever domain sends your mail.
- Google Business Profile. Update the website field. The same goes for Yelp, industry directories and anywhere your business is listed.
- Analytics and ads. Update the property URL in Google Analytics and the final URLs in any ad campaigns. Ads pointing at a redirect still work, but they waste a hop on every click.
- Payment and booking tools. Stripe and PayPal webhooks, booking widgets and CRM forms often have the old domain saved in their own settings. A webhook sent to the old address may not survive the redirect.
- Your best backlinks. Email the sites that link to you most and ask them to update the link. The redirect passes the visitor along either way, but a direct link is cleaner.
- Print and signage. Business cards, vehicle wraps and packaging will carry the old name for years. That is one more reason the redirects stay.
What to Do With the Old Domain
Keep it. Google's developer documentation says to keep redirects for as long as possible, generally at least one year, and from the user's perspective to consider keeping them indefinitely. The Search Console help page sets a floor of 180 days. Renewing a domain costs a small yearly fee. Losing it means every old link and printed card goes dead.
A lapsed domain is a risk as well as a loss. Expired business domains get bought back by speculators, and a stranger then controls an address your customers still trust. Put the old domain on auto-renew, under an account the business owns, and leave the redirects running.
Domain Change FAQ
Will changing my domain name hurt my SEO?
Expect a dip while Google processes the move, then a recovery if the redirects are right. Google's own site-move guidance says to expect temporary fluctuation in rankings during a move. The permanent losses come from mistakes: redirecting every old page to the new homepage, letting the old domain expire, or changing URL paths and content at the same time as the domain.
How long should I keep 301 redirects from my old domain?
Google's developer documentation says to keep them for as long as possible, generally at least one year, and suggests keeping them indefinitely from the visitor's point of view. The Search Console help page for the Change of Address tool gives a floor of 180 days. Keeping the old domain registered and redirecting costs very little, so most businesses never switch it off.
Can I change my WordPress domain from Settings, General?
You can change the WordPress Address and Site Address there, but that only updates two values in the database. Every internal link, image path and embedded URL in your posts still points at the old domain. Run a full search-and-replace on the database afterwards, using a tool that handles serialized data, such as WP-CLI.
Do I need the Change of Address tool in Google Search Console?
It is not required, but it helps on a full domain change. The tool tells Google the move is deliberate and forwards signals from the old domain for 180 days. You need to own both the old and new properties in Search Console under the same Google account, and the old homepage must already 301 redirect to the new one.
Should I change my domain and redesign the site at the same time?
Avoid it when you can. If traffic drops after a combined move, you cannot tell whether the cause was the new domain, the new URL structure or the rewritten content. Move the site to the new domain with its pages unchanged first, let the rankings settle, then start the redesign.
Getting Help With the Move
A domain change is a few hours of careful work and a few weeks of watching Search Console. If you would rather hand it off, our WordPress migration service builds and tests on staging first, sets a 301 redirect for every URL that changes, submits the updated sitemaps, then checks crawlability after launch. If you also want the new domain registered alongside your hosting, see domain registration.
Book a free 30-minute call and we will look at your current site, your new name and the links worth protecting.
Related reading: How to Migrate a WordPress Site with Zero Downtime • How to Transfer a Domain Name • How to Choose a Domain Name