How to Change Domain of a WordPress Website [Without losing SEO]

By: Sunil Kumar |  In: WordPress  |  Last Updated: 2018/06/18

Sometimes you may find a need to change the domain name of your WordPress website. This can be due to any reason- Maybe you find a better domain or you were using a temporary domain for testing and Now you want to switch to the main domain or anything else. In every case, you need to change the domain of your WordPress website.

Step 1: Create a Full backup

Before you make any changes to your site its recommended that you take the full backup of your website.
Don’t worry…
you don’t have to do it manually. There are a lot of plugins available that you can use to create A full backup. You can use-
In this guide, I am using All-in-One WP Migration for both creating the backup and restoring the backup.
To create a backup of your old site install this plugin and click on All-in-One WP Migration available in the left menu of your WordPress Dashboard.
Click on EXPORT TO > FILE option. It will create a single file of your WordPress site(including media files). After completing the process Download the file.

Step 2: Install WordPress to your new domain

Install WordPress to your new domain. If you don’t know How to Install WordPress you can follow this guide- How to install WordPress.

Step 3: Import your backup file

Note: In the free version, you are allowed to import a 512MB file. If your website is more then that you have to get the premium version of this plugin.

Now as you have setup WordPress to your new domain Install the same plugin(All-in-One WP Migration)  to your new domain.
After installing plugin click on  All-in-One WP Migration > import to import the backup file you created before.
import worpress-website-min
Now select the .wpress file to start the import the process.
Once the importing file is completed click “CONTINUE” to overwrite all your existing file to the new files. Since it is a new installation you need not to worry about anything.
After successful completion of importing process, review all your setting are fine and your new domain is the exact replica of your old domain by visiting your new domain.
NOTE- Since you imported all your setting and database from the old site, Your Dashboard URL, database username-password, dashboard username-password and all other credentials will be changed to same as on the old website.

Step 4: Setup 301 permanent redirection

Setting up a permanent 301 redirection is very important for both SEO and user experience.
Setting up redirection allow to redirect all your old site traffic to the new site automatically.
To set up 301 redirection you need to login to your server and change the .htaccess file a little bit.  You will find this file in your root directory.
open, .htaccess file and paste this code into it-

#Options +FollowSymLinks
 RewriteEngine on
 RewriteRule ^(.*)$$1 [R=301,L]

Replace to your new domain.

Step 4: Inform Google about the migration

If you don’t want to lose your SEO  you must inform Google about the migration of your old domain to new domain.
To inform Google, login to your Google Search Console Account and select Your old domain.
Now click on the gear icon on right top and select “Change of Address”
Now below screen will be opened

  1. Select your new site from the drop-down in step -1.
  2. Now check the 301 redirection is working properly or not.
  3. Now you will be asked to verify both of your domain.

Note: When verifying your old domain you need to remove the 301 redirection for a while as your old domain will be redirected to the new domain and you won’t be able to verify your old domain.

Click “SUBMIT” button to submit the change of redirection request. It will take some time to complete the process.

Step 5: Notify Users

While 301 redirection does the job its good to announce to the public about the migration So that they won’t be surprised when they are redirected form old-domain to the new-domain.
You can do it by simply writing a blog post on your new domain or sending mailers to your users or simple notification of migration on your new domain.
Once you migrated your domain do not forget to share your experience and share the post.


Leave a Comment

Your email address will not be published.


Sunil Kumar

I am the owner of acmeextension. I am a passionate writter and reader. I like writting technical stuff and simplifying complex stuff.
Know More

Join more than 10,000 others Web Developers