If you have a wordpress site/blog then probably at some stage you would need to change domain of your site. Because some time bloggers face some difficulties and instead of starting a new site ( which is fairly long and time requiring process) they decide to change the domain name.
There could be several reasons for changing domain name like if you don’t like your domain, or if your domain have spammy backlinks or if your domain is been hit or any other reason.
In this situation people hire freelancers etc to move their site to a new domain but after reading this post, you would be able to move wordpress site to new domain without losing ranking in google and other search engines. The process is very straight forward and anyone who can create a wordpress site would be able to do it easily. It requires on 10-15 minutes.
Preparation for moving wordpress site to new domain:
Before starting the migration you would need to do some preparations which are explained here:
Register your new domain and update nameservers:
First of all you would need to register a new domain to which you want to migrate your wordpress site. And update its nameservers to your hosting. If you want to host this site in hew hosting then update nameservers to new hosting.
Take backup of your site:
Now, after registering domain, the next important thing is to take backup of your site because if something went wrong you could easily recover your site. And if you are moving to new hosting at the time of migration then you would also need it. You need to take backup of two things:
- All wordpress files
Step by step guide to move your wordpress site/blog to new domain without losing seo:
Now after doing the preparation, you are ready to go.
Step 1: Change site url and wordpress url:
There are several ways to change site url and wordpress url of your site but the easy one is to change them is from dashboard before starting migration process from your old domain. Here is how to do it:
Login from your old domain to your site’s wordpress dashboard and go to settings. In general tab, look for WordPress Address (URL) and Site Address (Url) and replace your old domain with new domain exactly in the same way to old domain is written.
Note: The moment you change these urls, and save your settings, your site will go down. Don’t worry it would be live again when you migrate your site to new domain.
Step 2: Move all files to new domain:
Then the next step is to move all the wordpress files to the directory of new domain. You can do it via FTP or file manager. I prefer to do it from file manager and here i will tell you how to do it form file manager:
Login to your hosting cpanel and after adding your new domain to your hosting, go to file manager then go to directory of your old domain and select all the files. If your old domain is in the root directory then select it from public_html.
Move all of these files to your new domain directory.
Step 3: Move database:
If you are changing your hosting then you would need to do this step, otherwise you don’t need to do it because you have already copied wordpress files to new domain and these files are already connected to database via wp_configure file.
After doing these steps correctly your site would be live with new domain. If your site is not live then it means that you have done some mistake.
Your old domain will show blank page and we need to redirect it to new one so that ranking are not lost.
Step 4: Permanent 301 redirect your old domain to new one:
Now this step is very much important because if you want to not loose any ranking, you should redirect the old domain to new one.
To do this go to directory of your old domain in file manager. And create a file and name it .htaccess. In this file add the following three lines:
- #Options +FollowSymLinks
- RewriteEngine on
- RewriteRule ^(.*)$ https://www.newsite.COM/$1 [R=301,L]
Replace the newsite.com with your new domain.
After saving this file, when you open your old domain it would redirect to new one. Not only the home page but all the pages. And this way the pages which are ranking in google would remain these and you would not see any change in traffic.
Step 5: Notify google via webmaster tools:
Now the last step is to notify google. For this go to your google webmaster tools. And open your old domain. And click on the gear wheel and then click on change of address. Enter you new domain there and you are done.
After doing all the steps mentioned above, you site would be correctly migrated to new domain without lose of any ranking.
If you have any question about the process, you can ask via the comment section below. I would be glad to help you out.