Beginner's Guide for WordPress / Start your WordPress Blog in minutes

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

Do you want to move your WordPress site to a new domain? Changing your website’s domain name can significantly impact your SEO rankings, so it’s a process that needs to be done very carefully.

While you cannot avoid temporary SEO fluctuations when migrating your website to a new domain, you can definitely minimize the impact and quickly regain your search traffic and rankings.

In this guide, we will show you the proper way to move WordPress to a new domain without losing SEO.

Migrating a WordPress website to a new domain name without loosing SEO

Here’s the 5 step process that we’ll cover to help you migrate your WordPress site to a new domain name:

  1. Create a Duplicator package of your WordPress site
  2. Create a database for your new domain name
  3. Unpack WordPress on the new domain
  4. Setup permanent 301 redirects
  5. Notify Google about the change

What to Know Before You Change Domains

Before you start, there are a few things you should know.

The process of transferring to a new domain will temporarily affect your search engine rankings, since Google and other search engines will need to adjust to the changes.

Yes, this will also temporarily affect your search traffic as well. Please keep in mind that this is normal, and it happens to all websites that switch to a new domain.

However, you can dramatically decrease the SEO impact by following this guide. We will show you the right way of moving your WordPress site to a new domain name, setting up proper 301 redirects, and notifying search engines.

Please note that this guide is not for moving WordPress site to a new host. This is for switching a domain name only. While the process is similar, there are a few extra steps involved in this process. These extra steps will help you to protect your SEO rankings and traffic.

Lastly, if your old website is on WordPress.com, then you need to follow the instructions in our guide on how to move from WordPress.com to WordPress.org instead.

Pre-Steps: What You Need to Get Started

In this guide, we are assuming that you have your WordPress website setup on oldsite.com, and you are trying to migrate it to newsite.com.

We are also assuming that you already have a WordPress hosting account, and you are familiar with your web hosting control panel.

You’ll also need to know how to use an FTP client like FileZilla, or how to edit files using the File Manager app available under your hosting account dashboard.

In case you don’t have a web hosting provider or are looking to switch to a new one, we recommend using Bluehost (great for small sites + comes with a free domain) and either SiteGround or WP Engine (great for larger sites or online stores).

Once you have those things in place, you’re ready to start the process!

Step 1: Create a Duplicator Package of Your WordPress Site

The first thing you need to do is create a full backup of your WordPress site. We’ll use this backup to create a duplicate of your website, so you can set up the redirects properly from your old domain to the new one.

While there are many WordPress backup plugins available, we’ll be using Duplicator which is a free backup and migration plugin.

Let’s start by installing and activating the Duplicator plugin on your old domain name. For more details, see our step by step guide on how to install a WordPress plugin.

Once activated, the plugin will add a Duplicator menu item in your WordPress admin. You need to click on the Duplicator menu, and then click on the ‘Create New’ button to create a new package, or copy of your WordPress site.

Create a new Duplicator package

After that, you will be asked to click on the Next button to continue.

Duplicator will now run the website duplicator wizard. First, it will run some tests to see if everything is in order. If the plugin finds an issue, then you will see a warning with instructions.

If all items are marked ‘Good’, then click on the ‘Build’ button.

Build package

The plugin will now start creating a duplicator package of your website files. This process may take a few minutes depending on the size of your site.

Once finished, you’ll see download options for the Installer and the Archive package. You need to click on the ‘One-click download’ link to download both files to your computer.

Download Duplicator package

The archive file is a complete copy of your WordPress files. It includes your WordPress themes, permalinks settings, plugins, uploads, and any other files created by WordPress plugins.

The installer script is a PHP file that will automate and run the WordPress migration by unpacking the archive file.

Step 2. Create a Database for Your New Domain Name

Before you can move your WordPress site to the new domain, you’ll need a new SQL database to unpack WordPress on your new domain name.

If you have already created a database, then you can skip this step.

To create a database, you need to visit your hosting account’s cPanel dashboard, scroll down to the ‘Databases’ section, and then click on the ‘MySQL Databases’ icon.

Creating a new database

Note: Your hosting control panel may look slightly different than the screenshots. However, you should still be able to find a Databases section with an option to create a new database.

Simply provide a name for your database and then click on the ‘Create Database’ button.

cPanel will now create a new database for you. After that, you need to scroll down to the MySQL Users section.

Next, provide a username and password for your new user and click on the ‘Create a user’ button. Make sure to note the username and password in a safe place.

Adding a new MySQL database user

The new user you just created still does not have permission to work on the database. Let’s change that.

Scroll down to the ‘Add User to Database’ section. First select the database user you created from the dropdown menu next to the ‘User’ field. Then select the new database you just created and click on the Add button.

Add user to database

Your database is now ready to be used for moving WordPress to the new domain name. Make sure to note down the database name, username, and password. You’ll need this information in the next step.

Step 3. Unpack WordPress on Your New Domain Name

Now you need to upload the Duplicator files you downloaded earlier to your new domain name.

The Duplicator package includes your WordPress installation as well. This means you don’t need to install WordPress on your new domain.

First, connect to your domain name using an FTP client. Once connected, make sure that the root directory of your website is completely empty.

After that, you can upload the archive and installer files to the root directory (usually it is public_html).

Upload Duplicator files to new domain name

Once both files have finished uploading, you are now ready to unpack WordPress.

Open a new browser tab and go to the following URL:

http://example.com/installer.php

Don’t forget to replace example.com with your new domain name. This will launch the Duplicator migration wizard.

Duplicator Wizard

The installer will look for the archive file. You need to check the terms checkbox and click on the Next button to continue.

Now, the installer will ask you to configure your WordPress database information.

Your host will likely be localhost. After that, you will enter the details of the database you created for your new domain name in the earlier step.

Connect your new database

Once done, click on the next button to continue.

Duplicator will now unpack your WordPress database backup from the archive into your new database.

Next, it will ask you to update the site URL or Path. You shouldn’t have to change anything since it automatically detects the new URL of your domain name and its path.

If it doesn’t, then you can change the URL to your new domain name. After that, click on the next button to continue.

Update site URLs

Duplicator will now finish the migration.

You can click on the ‘Admin Login’ button to enter the WordPress admin area of your website on the new domain name.

Finishing WordPress migration to new domain name

Step 4. Set Up Permanent 301 Redirects

The next step is to point users arriving on your old domain name to the new domain. This is done by setting up 301 redirects.

301 redirects are very important for SEO and user experience. Adding them will allow you to automatically redirect users and search engines to your new domain name.

In other words, whenever someone lands on a post or page on your old domain, they will be automatically redirected to the same post or page on your new domain, instead of seeing a 404 error.

To keep your redirects in place, you’ll need to keep your old WordPress installation active so it can continue to redirect to the new one you just created.

There are two ways to set up the redirects. The first method is easy and just takes a few clicks. The second method requires you to edit files manually.

Method 1. Set Up 301 Redirects With All in One SEO

For this method, we’ll be using All in One SEO (AIOSEO). It is the best WordPress SEO plugin on the market and allows you to easily optimize your WordPress website for SEO.

First, you need to install and activate the All in One SEO plugin on your old domain. For more details, see our step by step guide on how to install a WordPress plugin.

Note: You’ll need at least the Pro version of the plugin to access redirect manager addon. You can also set up AIOSEO on your new WordPress site to boost your search engine rankings and traffic even more.

Upon activation on your old domain, you need to visit All in One SEO » Redirects page and click on the Activate Redirects button.

Activate redirects

Next, you need to switch to the ‘Full Site Redirect’ tab and turn on the ‘Relocate Site’ toggle. After that, you need to enter your new domain name next to ‘Relocate to domain’ option.

Full site redirect

Don’t forget to click on the Save Changes button to store your settings.

Method 2. Manually Set Up Redirects to New Domain

This method requires you to edit the WordPress .htaccess file on your old domain name.

First, you need to connect to your old site using FTP and edit the .htaccess file.

This will be located in the same directory as your wp-includes or wp-admin folder. Open the .htaccess file and paste the following lines of code at the very top:

#Options +FollowSymLinks
RewriteEngine on
RewriteRule ^(.*)$ http://www.newsite.com/$1 [R=301,L]

Note: Replace newsite.com with your new domain in the above code.

Once you have applied these changes, then visit your old domain name. It should automatically redirect you to the new domain.

If it doesn’t, then it means the redirection is not setup properly, and your server likely doesn’t support redirect rules. You need to contact the support team at your web hosting company to get RewriteEngine turned on.

Step 5. Notify Google About Your New Domain

Now that you have moved WordPress to a new domain name and set up redirects, it is time to notify Google about your change of address. This will help Google find your new website domain quickly and start showing it in search results.

First you need to make sure that both your new and old domain are added to the Google Search Console as two different properties. See step 1 in our Google Search Console guide for instructions.

Next, you need to select the old domain name as the active property in your Google Search Console account dashboard.

Select old domain

After that, click on the Settings menu from the left column and then click on the ‘Change of Address’ tool.

Change of Address

Now you need to select your new domain under the Update Google section, and then click on the ‘Validate & Update’ button.

Add new address to change of address

That’s all, Google will now validate that your old domain is redirecting to the new domain and save your changes.

On the next screen, Google Search Console will show you a step by step wizard to submit your change of address request.

Notify Your Users About the New Domain Name

While the 301 redirects do their job, it is always good to make a public announcement about the migration.

You can do this by simply writing a blog post on your new site and sharing it on your social media accounts.

If you have an email newsletter or push notification subscribers, then you should send out an announcement to them, too.

This can be helpful in a lot of ways.

First and foremost, your users are more likely to remember the new domain once they read about it.

Second, you can ask your users to let you know if they see any bugs. You alone cannot test your site in every different type of browsers or system environment. It’s always helpful to have a fresh pair of eyes looking at it.

We hope that this tutorial helped you move your WordPress site to a new domain name. You may also want to see our guide on how to get a free email domain, or see our expert pick of the best business phone services.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit – a collection of WordPress related products and resources that every professional should have!

Reader Interactions

486 CommentsLeave a Reply

  1. How do you do with old 301s in htaccess that go from old sub-pages to new sub-pages in the old domain?Thanks for a very good guide!

  2. Great hands-on tut up to the almost-end of step 3.
    Now did I oversee something? I am completely blank on how (which user/pw combination to use) to log in to the new WP admin?
    Nowhere on the journey did I make a new WP installation, so I do not store any log-in credentials for the WP dashboard… Pls?

    • You would use the same login information as the previous site as the user table would be duplicated in this process as well :)

      Admin

  3. I searched for two days until I came across your blog. I have tried 3 or 4 different codes and none of them worked. I tried yours and it worked like a charm. Thanks. But this post needs to be updated. You can no longer switch back to the old version of Console and I was unable to find a change of address option.

    But still great posts. Thanks a bunch!

    • Glad our recommendation worked, Google has changed where it is located but if you use their search for tools in your console you should still be able to use the change of address tool.

      Admin

  4. Many thanks for this very helpful tutorial. It has worked perfectly!

    Just a small query… In the last step 5, Google Search Console says this ‘Change of Address’ function works only for root level domains (while I’ve a blog address in the form abc.co.in/example)

    Hence, is there an alternative method that can be used here, or will the 301 redirects (incorporated in Step 4) suffice?

    Many thanks again for the wonderful help throughout all the articles… Lots of good wishes!

    • If it is not only the root domain then the 301 redirects would be what you want to stay with and should be good enough for now

      Admin

  5. Hi, thanks – this is interesting.

    Two weeks ago I migrated 3 sites into 1 new site, using the above process. All looks good as far as 301 re-directs are concerned but very few of the posts on the new domain are showing in the SERP. Also, many still have the old domain – because of this, organic traffic is down about 60% currently.
    Do you know how long it takes for Google to re-crawl, re-index and sort this stuff out?

    • Sadly, when merging multiple sites rather than only changing the domain, it can vary from site to site for how long it takes.

      Admin

  6. This tutorial is always my go-to piece whenever I’m moving or redirecting a website. A life-saver I must say.

  7. Thanks for being such an immense help. I have a challenge in using Duplicator. I went as far as creating the package and uploaded it to the new domain (a subdomain actually). The problem is when I try to install it I get a 403 error that keeps me stuck at the 1st step. How do I resolve this please?

  8. Here, you told the old domain is redirected to the new domain.
    If I have to show a website in the old domain name. I will be able to upload website old domain name?

    • You would need to clarify your question. If you redirect the old domain but want a site on the old domain then you would need to remove the redirection for the site content to show

      Admin

  9. as usual very well explain each step. i want to add one more point some websites leave a message in old domain when someone visit to old domain he
    reads about website transferred to an other domain like stumble upon when i visit to this site i read stumble up move to mix.

    i want to know is it possible to move data like classified ads from one website (website created in WordPress to another website with same domain name but CMS platform change to Joomla or Drupal or in reverse? without effecting website SEO?

    • Changing platforms will always have a temporary effect on your SEO but overall there shouldn’t be any long-lasting effects on your site’s SEO

      Admin

  10. Best articles on the planet! Thank you WPBeginner for making life so much easier for the non-tech website owners!

    Keep up the good work

  11. Thank you so much for this!

    I always thought this was a daunting task but you have made it so very easy.

    Great article.

  12. How long do you recommend keeping the old website domain redirecting to the new domain for the purposes of SEO? Is it best to keep it forever or is there a point where all the juice from the old domain has been passed onto the new one and the old domain can be discarded?

    Thanks for your article it gave me the push to finally do the rebrand launch!

    • Sadly, that question varies from site to site and what works best for the individual

      Admin

  13. Thorough content. Thank you. My question is, in Step 3 you said “make sure the root domain is completely empty.” I’m a bit confused here. I want to be able to move an old site to a new one site, these are not empty domains but functional websites with about 50 pages each.

    The reason why I want to merge Site A and Site B (the main site becomes Site B) is because they’re both in the same industry, so I want to stay focused.

    Can I still use this tutorial to migrate my old site to the new site — seeing the root domain isn’t completely empty?

    Please help me.

    • For what it sounds like you’re wanting to do, you wouldn’t want to use this guide, you would want to import your content on to the site where you want it to appear and then have your hosting provider set the secondary domain to point toward your primary domain.

      Admin

  14. Hi. This is not redirecting the main domain (e.g example.com) but only every other link after it. How to redirect even the main domain?

    • You may want to check with your hosting provider to ensure they’re not preventing the redirect in some way

      Admin

  15. I am stuck at step 3. I try to go to example.com/installer.php (yes I use my domain name) and nothing happens. It just takes me to my site welcome page saying a new webpage will be built soon. I cannot get the duplicator app to come up. I saw other comments on here to use www. first but that also does not work. Help please!

    • You may want to check with your hosting provider to ensure they don’t have a plugin or temporary page that would be preventing you from seeing the location or logging into a pre-installed WordPress site.

      Admin

  16. Well described.

    But I am not using any cPanel right now. What I supposed to do on that step. Pls help.

  17. Great Article

    What if i wanted to keep the some artcile in old domain and move around 200 articles to new domain

    Will 301 redirects are sufficient to pass the link juice

    • It will keep some of the SEO, however, if you’re not transferring the entire site then you would lose any weight your domain added to your articles.

      Admin

  18. Hi! Thanks so much for your help and guidance. I’ve just written to the Google Search Console community.

    Corina

  19. I followed the steps you guys mentioned above and I got to step 5 – notify Google. After verifying my new domain, I tried the change of address from my older one to the new one and I got stuck. When I go to the “change of address” page/ pick your new site from the list, it does not show me the new site. I clicked on “add it now” and it does show up on that page along with the older domain. Yet, I cannot pick it from the list (it does not show no matter what I do). I verified the site several times with TXT and via Bluehost.

    • You may want to check with Google’s search console that you are the owner of both domains in the system as that can sometimes be the issue.

      Admin

      • Hi! Thanks for getting back to me.

        I am the owner of both domains. I checked for each domain in Google Search Console/ Settings/Ownership verification. It says “you are a verified owner” for both of them.

        Sorry, I’m not a technical person, so I don’t know what I don’t know and I’m at a loss.

        Thanks so much for your help with this!

        Corina

        • Sadly, you may need to reach out to the support forums for the Google search console and let them know you’re domain is not a selectable option

  20. Hello, do you have tutorial how to make sub.mysite.com to newname.com without losing SEO hope you reply i needed this tutorial.

    Thank you.

    • You could certainly follow this method and then remove everything that isn’t a post. Another option would be to set up a new site then export only your posts under Tools>Export to import them on the new site using Tools>Import

      Admin

  21. This article helped me alot brooo. I have bookmarked it.
    Today was able to move my old domain to my new one

    Thanks alot wp beginner ☺.

  22. Hi, how about domain redirect from domain provider dashboard (namecheap as example)?
    I don’t want continue pay old hosting, because is expensive.

    • You would want to reach out to your new hosting for their method to transfer the domain as each provider can have a slightly different method.

      Admin

  23. Hello:

    I need to design a new wordpress site with a new theme.
    I want to do it in a subdomain while the original website keeps working.
    I have thought that when finished designing the whole site, migrating it to the main domain, overwriting the former site.

    Is it possible?
    Does this keeps the SEO ranking of the original site?

    I’d be very grateful if somebody could answer.

    Best

    • You would want to check with your hosting provider for if they have an option for a staging environment to do what you’re wanting. Depending on the changes you make it could affect your SEO.

      Admin

  24. Hi! Thanks for this article.

    I followed the instructions with a test site and everything worked perfectly. But now that I’m trying to move my main site (7+ GB), Duplicator shows error after error related to my hosting. I’m trying to move both to another host and another domain. Any ideas on alternatives to Duplicator?

    Best

    • We do not have an alternative recommendation at the moment but if you reach out to the plugin’s support they may have a recommended workaround.

      Admin

  25. moving all business under parent X to Z
    x.com to z.com
    content from X into sub folder of Z
    any particulars to be aware of?

  26. Hi,
    I am currently running a wordpress site which i built 4years ago. Now my client wants to change the feel of the website. i just bought another theme for the for the new website. 1. How do i build the new website without disrupting the old site? 2. How do I easily switch the new site with the old site ? Any answers

  27. Hi!
    I only want to change hosting. While wanting to keep the same domain. For that we need to build the database on new hosting Or upload the old one.

  28. Can i change my dmain name to be with www.
    With the same name
    The exisiting one does not have www
    But i am planinig to move it to be with www.

    Both names has almost the same DA, PA and moz rank.

    I am worry about the rankning in google?

    Best Regards
    Nourdin

  29. I did this successfuly 2 years ago when I changed my business name and domain. As far as SEO goes, do I still need to keep my old site hosted after 2 years? The old site is still redirecting to new site. please let me know, thanks!

    • After two years it normally becomes personal preference on if you should maintain the old site, it is not required.

      Admin

  30. Thank you for creating such an article.

    I have redirected my 1st website with 301 (Permanent) to the 2nd website. Its been almost 5 months and my second website isn’t at the same Domain Authority.

    Why not all Domain Authority of my old domain has transferred to my new domain?

    • There are too many possible reasons for a change in domain authority, it could be anything from a Google algorithm change to any other factors.

      Admin

  31. This is really an awesome guide. Just a question.

    Since the site is relatively new and not much traffic is coming, After the files have been moved to a new domain, instead of redirecting 301, can I just delete the old site?

    I really need your thoughts on this guys!

    • If you’re not worried about traffic to the old domain, you could certainly do that

      Admin

  32. I did this successfully two years ago because I changed business name and domain, but I have a question regarding my old domain (which is still redirecting to new domain). I did this to keep all SEO from old site. Should I still continue to keep my old site hosted? Or is it safe, after two years, to remove hosting from old site.

  33. Hi Thanks for sharing this awsome guide. Can i know you that how much it will take time to moving old domain to new domain url in google. And, I have DA PA high of .com domain now i have move on .net some cause of issue. So my old domain DA PA will move on new one i mean on .net.?

    • For the change of address, if both domains are verified then it should take effect once you submit.
      Following this guide will minimize the effect to your domain authority and page authority but no matter what, if you change your domain you will take a hit even if it is a small hit.

      Admin

  34. I just want to know if i move the entire files from the old domain to the new domain, will it affect the site

    i did that with the cpanel move tool

    • Doing that you would have moved the files, you would want to ensure you update the urls for your site and in your site’s content as well as inform Google of the move

      Admin

  35. Hello, Thankx for helping my all life with each and every WordPress issue. I dont have words to thank for your all efforts to make our life easier with WordPress.

    I also just changed my domain name with your most helpful step by step guide. I am stuck at one point. To redirect my old urls to my new URLs. Do I need a hosting plan for the old domain??

    • If you use the method in the article you would want hosting for the old domain for some time. If you check with your hosting provider, some of them have methods to point the old domain to the new one.

      Admin

  36. Good day Wpbegginer, thanks for this insightful article, I have one question though, Am running a WordPress multisite with sub-directories and I wish to change the domain name of the multisite, my confusion is during the migration will my subdirectories be carried along and change to the new domain i.e (newdomain/subdiretory1) or do I need to add them manually all over again, thanks..

  37. I have completed all the steps to move the website to a new domain.
    The front end works fine: articiles, links, etc.

    The problem: when I try to do to admin dasboard or any link from Admin, I get a blank page: HTTP ERROR 500
    Any solution?

    Thanks!

  38. I’ve done a 301 redirect of an entire website from oldsite.com to newsite.com. Can I know delete wordpress and all of the files on the old site?

  39. Intaller.php is not opening after putting mynewdomain.com/installer.php, it’s showing 404 error. But I uploaded installer and package on new domain using FTP. I want to transfer existing domain to new domain on existing host and I register the new domain under my existing host as an addon domain.

      • I uninstalled the host under the old domain and installed it on a new domain and also imported the backup on the new domain, but am having issue redirecting the old domain to the new one, here are the domains and the new one (new)

  40. Hy.. I opened a new domain to improve my blog because I was using wordpress.com. Now I want o ensure that all my post are automatically redirected to my new domain. I have a very successful post and I don’t want to lose my SEO. Its possible to do this in the same way???

  41. Your all tutorials are great. I almost learn full wordpress from webeginner. Now, about this tutorial i think you should create a tutorial on All in one migration plugin it is very simple and easy.

  42. Great article but needs to be updated. Google sites changed a lot, especially Webmasters, which is just a meta category for few other tools. There is no changing site adres as shown above or maybe it moved to non-findable location? Also new tools are available so almost everything has changed…

  43. Sir, i want to ask a question please see this first and answer me ASAP. i read your article/blog thats why i ask this question.

    I was using a domain and a wordpress site is running on it.
    last month in may2018 the mistake happen renewal of hosting is done but domain renewal was skipped. and now that domain become approx one lakh rupee domain, which is not in mu budget. so i think when it will skipped by godaddy after redemption period then i will purchase it.

    Till then i purchased a new domain j”only s added”. and now i want my old site data and its seo all will come on this new domain.

    i repeat now i have no any access of old domain but i can access web hosting where my data is held

    so how i will migrate this or transfer old website data to new domain without loosing seo .please help

    • Hi Kunal,

      You just need to point your new domain name to the folder where your old website files are stored. We are assuming you have added the new domain name on the same hosting account. Go a head and edit your domain settings, contact your hosting provider for support.

      After that you will have to update URLs in your new WordPress site.

      Admin

  44. When simply changing domain name to current site, does any changes had to be made to nameservers?

  45. I also want to follow the same steps but Do I need to buy new hosting?

    Do I need to delete old site content?

    How can I access old site .htaccess file?

    Thank you :)

  46. Hi,
    Thanks for the article.
    I have been wondering, after all the process and 301 redirects what happens to my old domain?
    Best regards,
    Mohammed

    • Hi Mohammed,

      You need to keep the old domain alive as long as possible so that you don’t miss any traffic. However, if you don’t want to, then you can let your old domain expire after at least 6 months.

      Admin

  47. Hi,

    Thank you for your tutorial.
    I’m having an issue with Google.

    When I want to notify the change of address, the 3rd step to verify my website always failed. The weird thing is, if I remove the redirection, the verification goes through (but then the 2nd step where Google checks the redirection fails).

    Any idea what I’m doing wrong?

    Thanks for your help!

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.