How to Move WordPress to a New Domain (Without Losing SEO)

How to Move WordPress to a New Domain (Without Losing Your SEO Rankings)
Moving your WordPress site to a new domain name can be a daunting prospect. You‘ve worked hard to build your search engine rankings and establish your online presence at your current web address. The last thing you want is to undermine all that effort by carelessly switching domains.

The good news is that it‘s absolutely possible to move WordPress to a new domain without losing your hard-earned SEO juice. By following the proper steps and taking some key precautions, you can pull off a domain change with minimal impact to your search rankings and traffic.

In this comprehensive guide, we‘ll walk you through the process of migrating WordPress to a new domain name the right way. We‘ll cover what you need to know before getting started, provide detailed instructions for every step of the transition, and share some tips for protecting your SEO throughout the process.

Feel free to jump to any section using the links below:

Why Move to a New Domain?
What You Need to Know Before Changing Domains
Step-by-Step: How to Move WordPress to a New Domain
Tips to Minimize SEO Impact When Switching Domains
Troubleshooting Common Issues After a Domain Change
Why Would You Want to Move to a New Domain Name?
There are a few scenarios where it makes sense to move your WordPress site from one domain name to another:

  • Rebranding – If you‘ve changed your business or brand name, updating your domain to match is a logical next step.
  • Upgrading from a subdomain – Making the jump from a subdomain (blog.yoursite.com) to a top-level domain (yourblog.com) can make your site appear more professional and authoritative.
  • Harmonizing multiple domains – If you have multiple domains targeting the same keywords or audience, consolidating them into one authoritative domain can streamline your SEO efforts.
  • Switching from an obscure domain extension – While creative domain extensions (.biz, .info, .travel) may be tempting, .com is still the gold standard for building trust and credibility. Migrating to a .com domain could boost your online reputation.

Whatever your motivation for switching domains, it‘s critical to go about the process methodically. Jumping domains on a whim or without proper planning can have disastrous consequences for your search engine rankings and traffic.

Important Considerations Before Changing Domain Names
Here are a few key things to keep in mind as you prepare to move WordPress to a new domain name:

Expect temporary fluctuations in rankings and traffic. Even when you take every precaution, switching domains will almost always result in a short-term dip in search rankings and traffic. Don‘t panic – this is normal. With the proper setup, you can minimize the impact and bounce back quickly. Just be sure to manage expectations and give your site some time to settle in at the new domain.

Choose your new domain wisely. Avoid the temptation to make a hasty decision on your new web address. Take the time to research available domains and weigh the potential benefits and drawbacks. Favor domains that are memorable, easy to spell, and relevant to your brand and keywords. Moving to a spammy or trademarked domain in an attempt to game the search engines will likely do more harm than good.

Preserve your permalink structure if possible. Ideally, when moving WordPress to a new domain, you‘ll want to keep your URL paths the same to avoid broken links and maintain your existing SEO authority. For example, if your WordPress permalink structure is set to yourolddomain.com/post-name, you‘ll want to use the same /post-name structure on your new domain. If some URL changes are unavoidable, be sure to set up the proper 301 redirects (more on that later).

Only move domains when absolutely necessary. Again, moving to a new domain is not a decision to make lightly. It takes significant time and effort to do it right and recover your search rankings. In general, only consider moving domains if the long-term benefits truly outweigh the short-term risks. You‘re better off focusing your energy on creating great content and optimizing your current site than hopping from domain to domain in pursuit of a quick SEO boost.

If you‘ve weighed the pros and cons and decided that moving to a new domain is the right decision for your WordPress site, read on for a step-by-step guide through the process.

How to Move Your WordPress Site to a New Domain Name (Step-by-Step)
Follow these steps to properly migrate your WordPress site to a new domain name with minimal impact on your SEO:

Step 1: Set Up Your New Domain
The first step is to purchase and set up hosting for your new domain name. Ideally, you‘ll want to host the new domain on the same server as your existing site during the transition process. This will make it easier to test and troubleshoot before pointing your domain.

If you plan to move hosting providers as part of the migration, be sure to review that host‘s process for moving WordPress. Many managed WordPress hosts offer free migration services to help you make the switch.

Step 2: Create a Complete Backup of Your Existing WordPress Site
Before making any changes, it‘s essential to create a full backup of your current WordPress site, including your database and all core, theme, and media files. Use a trusted WordPress backup plugin to create an archive of your entire site.

In addition to having a backup on hand in case something goes wrong, you‘ll also use this duplicated version of your site to test the migration before going live at the new domain.

Step 3: Export Your WordPress Database
The next step is to export your WordPress database from your existing domain. You‘ll use this file to import your data to the new domain.

To do this, log in to phpMyAdmin from your hosting control panel. Select your WordPress database from the list on the left. Click the "Export" tab and choose the "Quick" export method. Leave the format set to "SQL" and click "Go" to download the database file (it will be saved as a .sql file).

Step 4: Edit wp-config.php and .htaccess
Using an FTP client or File Manager in your hosting panel, download a copy of your WordPress site‘s wp-config.php and .htaccess files.

Open wp-config.php in a text editor. Look for the line that says:

define(‘DB_NAME‘, ‘your_database_name‘);

Replace your_database_name with the name of the new database you‘ll create on your new host.

You‘ll also need to update the database username and password to match the credentials you‘ll use on the new host/database:

// MySQL settings – You can get this info from your web host //
/* The name of the database for WordPress /
define( ‘DB_NAME‘, ‘newdatabase_name‘ );

/* MySQL database username /
define( ‘DB_USER‘, ‘newdatabase_username‘ );

/* MySQL database password /
define( ‘DB_PASSWORD‘, ‘newdatabase_password‘ );

Save the edited wp-config.php file. You‘ll upload it to your new WordPress directory in a later step.

Next, open the .htaccess file you downloaded. Look for the WordPress permalink rewrite rules, which will look something like:

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

Replace the slash (/) after RewriteBase with your new domain (i.e. RewriteBase /newdomain.com/).

Step 5: Create a New Database and Import Your WordPress Data
Next, you‘ll create a fresh database on your new host and import the WordPress data from your old site.

Log in to phpMyAdmin or the database management panel on your new hosting account. Create a new database, as well as a database user with all privileges enabled.

Open the new database and click the "Import" tab at the top of the page. Click the "Choose File" button and locate the .sql file you exported from your old database in Step 3. Make sure the format is set to "SQL" and click "Go" to run the import.

Step 6: Upload WordPress Files to Your New Site
The final step in duplicating your site is to upload your WordPress files – including the wp-config.php file you edited – to the root directory of your new domain.

Connect to your new server via FTP or SSH. Navigate to the /public_html/ directory (or wherever you want the site‘s files to live). Upload all the WordPress files from your old site, including:

  • wp-config.php (the version you edited, NOT the original)
  • wp-content directory
  • wp-includes directory
  • Any custom theme or plugin files in the root directory

Step 7: Update URLs in Your WordPress Database
At this point, you should have a functional duplicate of your WordPress site set up at the new domain (be sure to test it and make sure everything looks right).

However, the URLs in the site‘s database will still point to your old domain. To update them, you‘ll need to run a find-and-replace on the database.

You can make these database changes manually in phpMyAdmin, but using a plugin like Better Search Replace or WP Migrate DB is much easier and less error-prone.

Install your database replacement plugin of choice on the duplicate WordPress site at your NEW domain. Run a find-and-replace to swap out all instances of the old domain URL with the new one.

Step 8: Set Up 301 Redirects from the Old Domain to the New
Now that you‘ve created a copy of your site at the new domain, it‘s time to point all your old URLs to their corresponding new ones. The proper way to do that is by setting up 301 redirects.

301 redirects tell search engines (and human visitors) that a page has permanently moved to a new URL. They preserve the vast majority (90-99%) of the old page‘s link equity and SEO authority, making them critical for maintaining your rankings during a domain change.

There are a few different ways to implement 301 redirects, depending on your hosting environment and comfort level with code.

If your hosting runs Apache, you can add rewrite rules to your old site‘s .htaccess file to redirect traffic to the appropriate URLs on the new domain. Use this format:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^olddomain.com$ [OR] RewriteCond %{HTTP_HOST} ^www.olddomain.com$
RewriteRule ^(.*)$ http://newdomain.com/$1 [R=301,L]

Replace olddomain.com and newdomain.com with your actual domains. This code should redirect all pages and posts to the same URL paths on your new domain (i.e. olddomain.com/sample-post will redirect to newdomain.com/sample-post).

Alternatively, many WordPress SEO and redirect plugins (like Redirection or SEO Framework) offer features to automate the setup of 301 redirects. This can be a simpler solution if you‘re not comfortable editing .htaccess.

Whatever method you choose, test your redirects thoroughly before moving on. Click through to a variety of pages on your old domain and make sure you‘re redirected to the proper pages at the new domain (and that the new pages load without any errors).

Step 9: Notify Google of Your Domain Change
To help Google process your site‘s move and update its index accordingly, log in to Google Search Console. Click the "Settings" gear icon in the sidebar, then click "Change of Address."

Follow the steps to submit a change of address request for your new domain. Google will validate that the new site is a complete copy of the old one and that the 301 redirects are set up properly. Processing the request can take some time, so be patient.

Step 10: Update Links and Notify Users
Finally, tie up any remaining loose ends by updating links to your site around the web and notifying your audience of the move.

Reach out to any sites linking to yours and politely ask them to update the URLs to point to your new domain. Update any external profiles or bios that mentioned your old domain. Post on your social media accounts and email any subscribers to let them know about your new web address.

The more you can spread the word about your domain change, the smoother the transition will be SEO-wise.

Tips to Minimize SEO Impact When Moving WordPress to a New Domain
Here are a few additional tips to protect your search engine rankings during and after a domain change:

Avoid combining a domain change with other major changes to your site, like a redesign or URL restructuring. The more variables you change at once, the harder it is to diagnose issues. Aim to keep everything else as consistent as possible through the migration.
Monitor your rankings and traffic closely. Use Google Analytics and Google Search Console to keep tabs on your site‘s key SEO metrics during the weeks and months following your domain change. If you notice any major, prolonged drops or issues, troubleshoot immediately.
Don‘t delete or deactivate your old domain. Keep the old domain active with the 301 redirects in place for at least 6 months to a year after the move (or indefinitely if possible). This gives search engine bots plenty of time to crawl the redirects and signals to visitors that you‘re the same trusted site they visited before.
Leave breadcrumbs for your visitors. In addition to the 301 redirects, consider adding a banner or message on your old domain to let people know you‘ve moved. Link to the new domain to make it easy for them to find you.
Prioritize quality and consistency. Ultimately, regaining and growing your search rankings after a domain change comes down to the same SEO best practices as always: create great content, optimize for relevant keywords, build quality links, and provide a positive user experience. Focus on those fundamentals to help your new domain gain authority in search engines.

Troubleshooting Common Problems After a Domain Change
Even with proper planning, it‘s possible to run into some SEO hiccups when transferring WordPress to a new domain. Here are some common issues and how to fix them:

Sudden ranking or traffic drops. A temporary dip after a migration is normal. But if your rankings and traffic are showing no signs of recovering after a month, make sure your 301 redirects are set up properly and that Google has processed your change of address in Search Console. If the problem persists, use Google Analytics and Search Console to diagnose any other potential causes, like an increased bounce rate or slow page load times on the new domain.

404 errors on the new site. If you‘re seeing a spike in 404 errors after switching domains, your redirects likely aren‘t set up quite right. Check that your rewrite rules have the proper syntax and are pointing to the correct new URLs. Pay close attention to case sensitivity, www vs non-www versions, and https vs http.

Duplicate content issues. If you start seeing duplicate versions of your content in search results (i.e. the same pieces showing up on both the old and new domains), Google is having trouble distinguishing which is the "main" version to index. This usually means the 301 redirects aren‘t working as they should. Re-test your redirects and consider adding canonical tags to the corresponding pages on your new site to tell Google which to prioritize.

While the specific problems that pop up will vary, the key is to stay vigilant. Monitor your site‘s vital SEO metrics closely so you can spot and address issues before they spiral into bigger problems.

The Bottom Line on Moving WordPress to a New Domain Name
When migrating WordPress to a new domain, the name of the game is maintaining your site‘s SEO authority. By taking the time to properly redirect your old URLs, notify Google and users, and troubleshoot issues, you can minimize ranking fluctuations and keep your hard-won SEO juice flowing to the new domain.

It‘s a lot of steps, but following this guide will help you cover all your bases to pull off a successful domain change. Just remember to carefully weigh the risks and benefits before starting the process. Moving to a new domain is a big undertaking – make sure it‘s the right choice for your website and audience.

Have any lingering questions about changing domains or protecting your WordPress site‘s SEO through the process? Leave a comment below!

Did you like this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.