Move your blog from sub-domain to main domain without loosing SEO

Hi Friends, Do you want to Move your blog from sub-domain to main domain without loosing SEO ? let me show you how i managed to do that in my website techblot.com.  I was working on my website (mydomain.com) and it’s blog (subdomain.mydomain.com ) from past few months. And found my blog performing better then my site, so i decided to delete my site and move my blog to main domain, but i had some SEO and back-links to my sub-domain and don’t wanted to loose them. So i just searched on google and different forums for some time and managed to do that.  Below are some steps i followed to move my sub-domain to the main domain without loosing my SEO.

Steps to Move your blog from sub-domain to main domain without loosing SEO

Also read >  How to export and transfer blogger to WordPress

Step 1 : Export your blog data

You need to export your blog data which include’s 

  1. Go to your WordPress dashboard and click tools
  2. Now click on Export,  select all content and click Download Export File.

Step 2 : Install WordPress on the main domain.

You can Install fresh WordPress on your main domain by creating new database but before doing that make sure you create a backup of your site so that you can restore your website in case of any error in future.

If you don’t know about how to install WordPress then click here to read a full tutorial about how to install WordPress by Me.

Step 3 : redirect your sub-domain to the main domain.

to redirect your sub-domain to your main domain you need to add below code to your sub-domain’s .htaccess file, If you don’t have any .htaccess file in your domain’s root folder then create one. It will redirect all your subdomain’s links  to your main domain e.g.  domain subdomain.yourdomain.com to yourdomain.com.

Rename sub-domain with your sub-domain name and domain with your main domain name in below code.

RewriteEngine on
RewriteCond %{HTTP_HOST} ^subdomain.domain.com
RewriteRule ^(.*) http://www.domain.com/$1 [L]

Note: Don’t forgot to rename subdomain to your subdomain name and domain to your domain name in above code.

Step 4 : Import your data on Main domain.

Now you can import all your previous blog data in your new installation and all your new url’s, comments and pages will be same as previous blog. Follow below steps to import your data.

  1. Go to your new dashboard on your main domain (yourdomain.com) and click tools.
  2. Now click Import, scroll down to WordPress and click install. It will install WordPress importer plugin to your blog which you can uninstall after completing your work.
  3. Now Click on Active plugin & run importer and upload your backup file which you Exported on Step 1
  4. Now choose post others or create new others according to your need, but i suggest you to create similar names like your previous blog.Now all the information will be Same as it was before. As well as, pages & posts will have the same date & time and will be be assigned to the same categories.

    All Set
    All Set

Thanks For Reading my regarding Move your blog from sub-domain to main domain without loosing SEO. Also read our article about how to change site title in WordPress or How to add custom domain in Blogger If you have any question or query feel free to comment below.

Photo of author

Aniket jain

1 thought on “Move your blog from sub-domain to main domain without loosing SEO”

Leave a Comment