301 Permanent Redirect from Blogger Beta to WordPress

Most Bloggers start out with free blog hosting with the most popular of the free services being Google’s blogger where you get a yoursite.blogspot.com address. Now you want to move from Blogger to your own domain. One of the best publishing software is provided by WordPress and the best part is it is free. Importing to WordPress from Blogger used to be a breeze using WordPress’s import posts feature. However when Google moved from Blogger to the new Blogger or Blogger Beta, it became impossible to use WordPress’s import utility.

However, you can now do so with the steps outlined here about Importing Blogger Beta Posts to WordPress

Many users were able to implement this method successfully. Now, we move to the next step. Lets deal with some questions I had so far …

1. What happens to my old blogger blog? Should I just delete it after importing to WordPress?

2. I heard Google penalizes duplicate content. I now have my posts at both my old blogger blog and my new Wordpress blog hosted on my domain. What should I do?

3. You mentioned using the 301 permanent redirect from blogger to wordpress. Can i do it?

Okay … lets deal with these questions first.

1. No, you should not delete your Blogger blog. I am sure you worked hard at it. You might have many subscribers to that blog. The search engines have content indexed to that blog. What happens if you delete your blogger blog is simple … you end up LOSING ALL YOUR TRAFFIC, all your loyal subscribers and visitors simply because they dont know your new address.

2. Yes, Google penalizes duplicate content. How do you deal with this.. well read on

3. When people move from their old website to a new one they use a 301 permanent redirect method without being penalized by the search engines. However, you cannot do this straight up with Blogger because you do not have access to your .htaccess file. So its not a simple plug and play unfortunately because of this.

How to redirect your old Blogger posts to your New wordpress blog posts using a permanent redirect

I wanted to thank Owen Barder for his excellent code to redirect your individual posts from blogger to wordpress. Also, thanks to Tom Sherman. I will try to stick to what these two guys have to tell.

Using the method outlined here, you will be able to

1. Redirect your visitors from your old Blogger blog to your WordPress Blog on your domain

2. Redirect your old posts to new posts on your wordpress blog instead of redirecting them just to your home page of your wordpress blog

3. Do all this in such a way that Google does not penalize you. You also get to transfer your Google Page Rank too. How about that ….. !

Step # 1: Import from Blogger Beta to your WordPress domain

I am assuming that you backed up your blog and Imported to your WordPress domain from the new Blogger or Blogger Beta. If you didn’t do, check out my article on Import from Blogger Beta to WordPress

Step # 2: Modify your Blogger Template to include redirects

Log into your Blogger account. Go to Template and then Edit HTML.  Paste the code shown below where you replace http://www.yoursite.com with the root URL of your Wordpress Blog

a. Add the code below after <Blogger> in your template

<MainOrArchivePage>
<script language=”javascript”><!–
var blog_root=http://www.yoursite.com/;
document.location.href=blog_root;
//–></script>
</MainOrArchivePage>

<ItemPage>
<script language=”javascript”><!–
var process_page=”http://www.yoursite.com/bloggerposts.php”;
var newpage=process_page;
var oldlink=”<$BlogItemPermalinkUrl$>”;

newpage+=”?p=”+oldlink;
newpage=newpage.toLowerCase();
document.location.href=newpage;
//–></script>
</ItemPage>

b. Add the line shown here somewhere in between the <head> ..</head> tags of your blog

<meta http-equiv=”refresh” content=”0;url=http://www.yoursite.com/” />

Notice the space between  /” and the />

somewhere in between the <head></head> tags like this:

<head>
<meta http-equiv=”refresh” content=”0;url=http://www.yoursite.com”>
</head>  

Step # 3: Prepare your WordPress blog for Redirects

a. Open Notepad. Copy and paste the code given below. Save it as bloggerposts.php or anything else you want and put it in the root location of your wordpress blog. By root, I mean not in any wp-admin or any other folder, but in the root and the link should be something like http://www.yoursite.com/bloggerposts.php

<?php

require($_SERVER['DOCUMENT_ROOT'].’/blog/wp-blog-header.php’);
$search_link = $_GET['p'];
$vars = explode(’/', $search_link);
$num = count($vars) - 1;
$filename = $vars[$num];
$slug = str_replace(”.html”, “”, $filename);

$SQL = “SELECT posts.* FROM $wpdb->posts AS posts WHERE posts.post_name = ‘$slug’ LIMIT 1″;
$posts = $wpdb->get_results(”$SQL”);

if ($posts) {
 foreach ($posts as $post) {
  $found_link = get_permalink($post->ID);
 }
}
else
{
  $found_link = “http://www.yoursite.com/”;
}

?>

<html>
<head>
<title>Redirecting…</title>
<script language=”javascript”><!–
document.location.href=”<?php echo ($found_link); ?>”;
//–></script>

<meta http-equiv=”refresh” content=”2;url=<?php echo ($found_link); ?>”>

</head>
<body>
<h1>Redirecting…</h1>
<p>You can also proceed immediately to <a href=”<?php echo ($found_link); ?>”><?php echo ($found_link); ?></a>.</p>
<p>The main blog URL is <a href=”http://www.yoursite.com/” mce_href=”http://www.yoursite.com/”>www.yoursite.com</a>.</p>
</body>
</html>

All you need to do in the above code is wherever you see http://www.yoursite.com , change it to the root location of your WordPress blog. What this code is doing is taking the URL from Step # 2 and redirect the user to the corresponding entry in your wordpress blog. In case it does not find the corresponding entry, it redirects to the homepage of your blog.

If you liked this article, click here to buy me a coffee!

Popularity: 76% [?]

Share This | Trackback URL | Comments feed for this post


95 Responses to “301 Permanent Redirect from Blogger Beta to WordPress”

Pages: « 1 [2] Show All

  1. 51
    Ashish Says:

    Hey Ryan Ferone,
    You say that “a. Add the code below after in your template“, but there no tag like that in blogger template code. Secondly, after i put that code in tags and tried to save the code, this error showed; Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
    XML error message: Open quote is expected for attribute "{1}" associated with an element type "http-equiv".

  2. 52
    Show in a Box » Redirect Users from Blogger to WordPress Says:

    [...] want to make the move from Blogger to your own self-hosted WordPress video blog, Ryan Ferone has some great advice about how to redirect your Blogger audience to your new WordPress site. You don’t want to [...]

  3. 53
    Sarah D Says:

    Woohoo! Wasn’t working for a while - getting Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ‘]’ in bloggerposts.php on line 5, and also blogger error codes - but after following some other suggestions here in the comments it directs to my new website homepage. Posts are redirecting to homepage only, but oh well, still very happy with the result!!

    Tweaks: I made doubly sure that I had selected revert to classic template from the template > edit html pane. I searched for all curly ” and , in ALL code (i.e. in template and php file) and replaced with straight ones. I changed the meta code NOFOLLOW to FOLLOW.

    Hope that helps others, thanks for posting this Ryan and others for their helpful comments, really appreciate the time you’ve put into it.

  4. 54
    Jimmy Says:

    Ryan’s tutorial is bad for 3 reasons: 1) You can’t copy and paste his code without fixing a lot of the curly quote marks, as those will be interpreted as errors by anything interpreting the code. 2) The code is way outdated, and doesn’t account for things like SEO, timestamps, and forwarding individual posts successfully. 3) I could not get it to work except to forward just to the home page, which doesn’t come off as convenient for me. If people actually find the blog entry they’re looking for and then just end up at the homepage of your new blog, they will leave. They will not search on your blog for the entry.

    I’ve written up a tutorial that does what I think is the best job of forwarding your blog, and this is based upon reading a lot of instructions, failing a lot, and finally figuring out a solid solution.

    Successfully Forwarding or Redirecting Blogger to Wordpress

  5. 55
    Buy tadalis. Says:

    Buy tadalis….

    Buy tadalis….

  6. 56
    Cheap winston cigarette. Says:

    Cheap winston cigarette a pack….

    Cheap winston cigarette a pack….

  7. 57
    Scott Says:

    Our old domain http://www.ezwatchstore.com was a good site with a pr of 5 and we rated up on the first page of several great volume search words such as security cameras and video security. We wanted to move higher and all indications were that a more descriptive domain such as http://www.ezwatch-security-cameras.com would help. So we performed a 301 redirect. Well everything stayed the same for a about a week. Then overnight we fell off every first page search. We found ourselves on page 3,4 and 5 of a search. A week later our precious pr of 5 went o 0. The only thing we changed was the domain. Ouch.. I later realize the old domain was just that, old. 5 years, and the new domain was well, new. 2 months. Any suggestions?

  8. 58
    bella vegas Says:

    bella vegas…

    Mans bleats dismay Muscovy,…

  9. 59
    name Says:

    Hello!,

  10. 60
    name Says:

    Hi!,

  11. 61
    name Says:

    Good day!,

  12. 62
    where is bonus didnt get trident poker Says:

    where is bonus didnt get trident poker…

    woofs hastened bicycles neutral pedantry accelerator …

  13. 63
    BLACKJACK Says:

    Get the latest mobile phones online at Dialaphone, the mobile phone shop offering great deals on the latest mobile phones.

  14. 64
    merit insurance health insurance alberta Says:

    merit insurance health insurance alberta…

    loners Estonian entertained:colander …

  15. 65
    Susheel Chandradhas Says:

    Check out this javascript by danny ng to redirect blogger pages to relevant self hosted wordpress site. it does everything you need, right here…

    really sweet.

  16. 66
    Mike Says:

    I don’t have a tag in my tempate. Any tips where to place the code?

  17. 67
    Mike Says:

    That was… I don’t have a tag in my template…

  18. 68
    md automobile insurance fund Says:

    md automobile insurance fund…

    mistakes petty!chaos indecent blatantly?…

  19. 69
    Raj Says:

    Thanks a lot, I don’t have tag in my template, where should I place the code?

  20. 70
    Moving from Blogspot to Hosted Wordpress? Says:

    [...] 301 Permanent Redirect from Blogger Beta to WordPress [...]

  21. 71
    casino mayanfortune freebie Says:

    casino mayanfortune freebie…

    liters?plasters merchant bases overrides….

  22. 72
    topmovies4u Says:

    Thanks a lot. Very good information

  23. 73
    How to... Says:

    [...] urls. Thank you so much! Your case is little different. Here is a good tutorial you can look at 301 permanent redirect, blogger beta, redirect blogger posts | TechCounter - TechNews, Money & S… __________________ PARTICIPATE IN CONTEST, EARN AS YOU POST ON THIS FORUM Free Classified Ads [...]

  24. 74
    insurance company mutual arbella Says:

    mutual insurance arbella company mutual insurance arbella company

  25. 75
    John Carter Says:

    This was an awesome post - helped me a lot. I gave on this when I set up my own blog and just put a big “sign” on my old wordpress blog to go to my new url. Now I will be able to fix that! Thanks!

    Home Based Greeting Card Business

  26. 76
    Elizabeth Says:

    Appreciate the info guys, thanks

  27. 77
    link building services Says:

    Is there any solution to just redirect the blogger blog to some other website? i mean you have to upload the file in your wordpress account in the method you mentioned. I just want my blog to redirect to some other website without uploading any thing. is it possible?

  28. 78
    Jorge Grippo Says:

    I’m sorry, but after implementing this recipe, the response for all Blogger clients remains HTTP 2OO OK, not HTTP 301 PERMANENT REDIRECT. It’s is true that modern browsers will perform a Redirect, but search engines and other robots, won’t.

  29. 79
    aquabot Says:

    very usedul post. thank you.

  30. 80
    SEO Consultant Says:

    Nice work dude… It is helpful for me as well as others..

  31. 81
    Koncerty Imprezy Says:

    Hi. Thanks for sharing! Good work.

  32. 82
    Melvin C Long Says:

    Everything that you explained is too complicated and as a laymen confusing.I don’t want to spend my time cutting and pasting confusing code which may or may not work! This is ridiculous

  33. 83
    stepaps Says:

    Афтор ты маниаг!!

  34. 84
    Saglik Sayfasi Says:

    Mans bleats dismay Muscovy,…

  35. 85
    free beats Says:

    Hi. Thanks for sharing!

  36. 86
    turkish food Says:

    Thanks for sharing! ..thank you

  37. 87
    Mitch Armstrong Says:

    I’m very interested in this topic, I am always searching online for articles that can help me. Thank you

  38. 88
    jessie Says:

    I am a websiter, its very usfull. Thank you very much

  39. 89
    Aluminium scaffold tower Says:

    Hey Ryan, Nice guide. I’d like to add, if you don’t mind, that for Google and other search engines that the best way to redirect to a new URL is to use a 301. It’s not the easiest task but it is possible for those that really need to preserve their search rankings.

  40. 90
    Hanging galileo thermometer Says:

    This is very useful, with graphical depictions. good for newbies like me.

  41. 91
    Currency Trading for Dummies Says:

    Your website looks really good. Being a blog writer myself, I really appreciate the time you took in writing this article.

  42. 92
    Cindy Says:

    Ahh, I remember the first blog I ever created. I wrote a story just like this. Smart minds must think alike!

  43. 93
    Gordon Levi Says:

    nice one. There is some useful infomation here good work. I can’t leave a constructive comment as i am abit out of my deph I will be checking back here periodically for your new updates. london insurance 30 St Mary Axe, london, EC3A 8EP 020 7193 4776

  44. 94
    Contrave Says:

    Great and easy to follow steps Ryan, I really do appreciate this. Does this still work with current Wordpress installs?

  45. 95
    les Says:

    I went through a similar process recently and am constantly tweaking to improve the migration if you are interested I documented my experiences and process of migration.

    You did the redirect however a 301 redirect is slightly different usually sent by the server and this is what I have been searching for.

Pages: « 1 [2] Show All

Leave a Reply