How to Move your WordPress Blog to a New Domain without Losing Link Juice

move your WordPress blog

For those who have been readers of this blog for a while, you may have noticed that I moved this blog to a new domain some months ago.

In its first incarnation, this blog was hosted at www.writewideweb.com but when I decided to change the focus of the blog from writing to blogging, I elected to move the blog to www.ProBloggerTips.com.

Deciding to move my WordPress blog was the easy part; getting the move done was another story entirely.

At first I moved about in circles as I tried to figure out the impact moving my site would have on my SEO. Of course, when not done right, a move to a new domain can lead to nightmares like duplicate content issues, loss of link juice and social proof.

Love to learn how to move your WordPress blog without losing your SEO reputation?

Step 1: Buy Your New Domain Name

I bought www.probloggertips.com at NameCheap and pointed its DNS to my hosting account.

Since I was just swapping domains and not the entire site to a new hosting account, I did not have to go into backing up of my files, though I would advise you to so as to beef up your comfort level.

Of course, if you a want to move your WordPress blog to a new  host, you would need to do a full backup of both your WordPress files and database.

To get that done, I recommend you use BackupBuddy plugin. I have used for months now and it works like clockwork, backing up my complete WordPress site daily.

Step 2: Change Your Blog Domain in WordPress

You need to change two WordPress options fields that reference your domain name in your dashboard to the new domain you bought.

WARNING: Before you change the reference to your old domain, ensure that you have already updated your DNS settings for the new domain and that propagation is complete. Most DNS servers take more than 24 hours after an update to completely propagate.

If you change reference to old your domain before DNS propagation for the new domain is complete, you will be in limbo, unable to login to your blog. To be on the safe side, allow at least two days after a DNS change before you update your WordPress blog location.

I will outline two options to change your domain in WordPress.

Option 1: This involves adding two lines of code to your wp-config.php file.
define('WP_HOME','http://www.probloggertips.com');
define('WP_SITEURL','http://www.probloggertips.com');
Of course, you have to change the domain in the code example to your new domain.

Option 2: Go to your WordPress settings tab and click on General Settings

move your WordPress blog

Change the URLs to your new domain.

Simply change the content of the WordPress Address and Site Address fields to your new domain and save changes. I

Step 3: Redirect Your Old Domain

Hopefully, you have backlinks coming into your website from all over the internet. You do not want to lose all that link juice now just because you moved your site a a new domain, do you?

To ensure you still get credit for backlinks after you move your WordPress blog, and that backlinks still point to the correct pages in your new domain, you need to do a 301 redirect to your new domain.

What the 301 redirect does is inform search engines that the locations of your pages have changed and that it will never return to that location again. With that information, the search engines will update their index and transfer your link juice to the new domain.

Using CPanel or an FTP client, locate the .htaccess file of your old domain and add the following lines to the document:

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

This is how my .htaccess file looked after I altered added my code:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.writewideweb.com$ [OR]
RewriteCond %{HTTP_HOST} ^writewideweb.com$
RewriteRule ^(.*)$ http://www.probloggertips.com/$1 [L,R=301]
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

Editing your .htaccess file is quite easy. You just have to login to your cPanel account and look locate it in the File Manager list.

Note that redirecting your domain will affect your rankings at least temporarily. After a while, though, things will even out and most of your reputation gets credited to the new domain.

Now visit any page bookmarked in the former domain. Notice that it quickly takes you to the corresponding page in the new domain.

Step 4: Update Your URLS Site-wide

Over the lifetime of your blog, you must have made references to your domain name in posts, codes, navigation bar and even your sidebar.

Now that you have moved your WordPress blog to a new domain, you do not want your links to still point to your old domain.

To change your urls across your site, Velvet Blues Update URLs WordPress Plugin comes to the rescue. It will scout through your site and replace all references to your old domain with the corresponding pages in your new domain.

All you will have to do is input the old URL and the new URL and select the areas you want the plugin to make replacements.

The rest is taken care of by the plugin, automatically.

Step 5: Tell Google about Your Domain Change

This is not a compulsory step, but it is necessary if you had a Google Webmaster account and would love to transfer your metrics for the old domain to the new one.

Login to your Google Webmaster Tools account to add and verify your new domain. This is how you add a site to Google Webmaster Tools.

In your Webmaster Tools account area, the tab you need to click is the Site Configuration. It will expand and show you more options. Click on Change of Address and follow the steps.

It’s quite easy to follow, so I won’t go into the steps here.

Step 6: Regenerate Your Site Maps

If you use XML sitemaps for search engines, you will have to rebuild it the sitemap manually.

I use the Google XML Sitemap Plugin which comes with a rebuild button. When you click on the rebuild button on your sitemap, it will not only rebuild your site structure but it will also notify search engines of changes it records.

Step 7: You Can Now Exhale

If you followed the steps above, your domain change should be uneventful. Your links, reputation and other metrics will follow you in a short time.

Now you have figured out how to move your WordPress blog, will you keep this information to yourself only? Who knows, you may have a friend somewhere wondering how to move a WordPress blog.

Do us all a favor and share this post… :)

About Yeremi Akpan

Yeremi Akpan is the founder of Pro Blogger Tips. Connect with him on Twitter, Google Plus and Facebook. You can also hire him to provide content marketing services for your business.

Sites Linking to this Post

  1. URL

Comments

  1. Hi Yeremi,
    very nice tutorial, I will keep it bookmarked if I will decide in future to make some changes in the domain names of my sites.
    Time ago I was approaching to move to a new blog domain, but the fear of lose all the link juice stopped me.
    Thanks for sharing.

    • Yeremi Akpan says:

      Hi Erik,
      Sorry for not approving your comment on time.
      It got caught up by Akismet as spam. I wonder why?

      I am glad you found the post useful. Moving a website to a new domain can be very scary, especially if the site has an established audience. Hope this post makes it painless for you when that day comes…

      • Hi Yeremi,
        honestly I do not know why my comment went in your SPAM.
        I have also troubles sometimes with Akismet,
        and I noticed that I always have to check the SPAM folder, because I can find some “real and good comments”, also by people with pretty popular blogs.
        I use also “G.A.S.P. plugin”, together with Akismet, to power up the protection of my site against SPAM.

        Thanks again for the reply, Yeremi.

        • Yeremi Akpan says:

          Hi Erik,
          Adrienne recommended G.A.S.P to me just yesterday with the warning that Akismet sometimes trap legitimate comments.

          Her comment made me decide to give my spam folder a look over – something I have never done in the past :( – (naive, I know), and lo and behold, I had legitimate comments trapped there too.

          I have just installed G.A.S.P and the human angle to its filtering makes more sense to me because I can understand the logic :)

          • I am happy to know that you added “G.A.S.P.” plugin, Yeremi.
            It will help you a lot against SPAM.

            If I can tell you more, I even added “Bad Behavior” plugin:
            “Deny automated spambots access to your PHP-based Web site”.
            Bad Behavior has blocked 6691 access attempts in my blog during the last 7 days.
            I have less SPAM comments now.
            May be you can give it a try.

            (And I use “Wanguard” plugin for the site registration).

            Have a great weekend, Yeremi.
            Erik Emanuelli recently posted..Case Study: How to Turn 400 Words Into Hundreds of Super-Powerful BacklinksMy Profile

          • Yeremi Akpan says:

            Hey Erik, thanks so much for bringing those plugins to my attention. Will give them a look. I am a bit familiar with “Bad Behavior” but “Wangaurd” is new to me. A pleasant weekend to you too!

  2. Adrienne says:

    Hi Yeremi,

    First off I have to tell you that I LOVE the look of your blog. I’m not a big fan of red but I really do love your blog… Great job is all I can say.

    Thanks for sharing this with us because I’m sure there are others out here who may run into this same issue. About two years ago I combined one blog’s content with another so they were on the same hosting service and I’ll be honest with you. I just called my hosting service and they did it for me while I was on the phone. God, I do love BlueHost… Sorry for that plug but it’s true. They’ve been to my rescue more times then I remember and they’ve always been so nice.

    I don’t think I’d be comfortable doing this myself, always afraid I’d mess something up I wouldn’t know how to fix. But it really wasn’t a complicated issue I will say because they told me what they were doing as they did it. I liked that.

    Thanks again and I have no doubt this new blog will be a big hit.

    ~Adrienne

    • Yeremi Akpan says:

      Hello Adrienne,
      It is an honor to have you in my blog.

      Thanks so much for leaving this comment, and I have to confess, when Dev said how kind you were, I never thought I would be a beneficiary of that same legendary kindness.

      I am glad you love the look of the blog. It was a labor of love, and to be honest, still a work in progress.

      Blue Host gets all the best reviews. I have never used them, but the company they keep is great so that must means their service is also great. :)

      Moving a blog to a new domain can be a real pain. I sincerely hope this post makes it a little more comfortable.

      Once again, thanks so much for being here and I hope to see more of you around.

  3. Denita Harold says:

    Great tips! I think the 301 redirect is the most important part of it all, without it everything falls apart.

  4. I’ve been contemplating making a name change was wondering if it was something I could do myself! This makes it look so simple. I have Bluehost too and have heard they are a great help.
    So if I follow these steps my blog will stay the same, just the domain will be changed?

  5. Yalcin says:

    Hi Yeremi,
    I did exactly what you suggest above.
    However, next day, I got a message from Google webmaster tools saying that google bots couldn’t reach my old site where I redirected to the new site.
    This is normal. Because I changed the site’s domain and it’s no more accessible.
    But can Google follow a redirect from a site which is no more accessible?

    • Yeremi Akpan says:

      Hi Yalcin,

      Remember that you have told Google inside your Webmaster Tools account that your site has moved. That is the reference Google would use to tell where the credit goes even if your old domain is expired.

      Sorry for taking so long to post this reply. I was dealing with issues with my hosting and had to get those details sorted out. :(

  6. Hi Yeremi,
    i am a newbie and i learn many of things from your blog last night i visit your blog first time and now i bookmarked it your post is very helpful for me great work….

Have Your Say

*

CommentLuv badge