Blogger or WordPress.com both works when you want to share content easily and for free and I happen to use Blogger for over 10 years to share content. This weekend I decided to consolidate all my blogs on Blogger (no reason) to WordPress.com and experience this platform “for free“.

The migration process was quite simple, export XML from Blogger backup [ Step 1: Export Your Blogger Blog] and import same in WordPress [Step 2: Import Blogger to WordPress], and all your blog posts are imported with the correct structure including images “all for free without additional plug-in”. Here are the steps from the video I followed. Step 3 to setting up Permalinks not required as import handled it correctly for me.

So far so good, with my new consolidated blog, was up and running on WordPress.com.

Now the real challenge started post-migration. Search engines still route traffic to old blog posts and places where new content is not being offered. I wanted to ensure all traffic gets routed to my new blog even for older posts without losing SEO (Search Engine Optimization). This is where redirection comes into play. Basic redirection route only to the home page and not to correct post within the blog. All existing solutions were asking for the plugin (a paid solution) or PHP file upload to the backend. WordPress.com with free edition does not offer support for any plugin or access to the backend where can upload a file. Decided to find a solution for free with limited choices.

After few experiments, I managed to redirect all my blog posts correctly to the new site without making any changes on WordPress.com or installing any plugins. Now when searching for content and click on the result, it opens the correct blog post on the blog.

Here are steps in case help someone trying to do the same without a Plugin.
Step 1: Log in to your Blogger dashboard and go to the Themes page and click on Edit HTML. Make sure you take backup of current content.

Step 2: Copy and paste the code shared below by making appropriate changes to the blog name. This step is required even when you need to use a plugin or PHP. When you add the code in purple (the only part I added) you are all set for correct redirection. Even the rest of the code can be changed but does not really play a role in the redirection. Now search results showing the blog but when click on the link correctly point to the post on the new site.

<$BlogPageTitle$><html>
 <head>
  <title><$BlogPageTitle$></title>
  <script>
    <MainOrArchivePage>
      window.location.href="https://yournewblogname.wordpress.com/"
    </MainOrArchivePage>
    <Blogger><ItemPage>
      var d=window.location.pathname
      window.location.href="https://yournewblogname.wordpress.com/"+d
    </ItemPage></Blogger>
  </script>
   <MainPage>
    <link rel="canonical" href="https://yournewblogname.wordpress.com/" />
   </MainPage>
   <Blogger>
    <ItemPage>
     <link rel="canonical" href="https://yournewblogname.wordpress.com/?blogger=<$BlogItemPermalinkURL$>" />
    </ItemPage>
   </Blogger>
 </head>
 <body>
  <MainOrArchivePage>
    <h1><a href="https://yournewblogname.wordpress.com/"><$BlogTitle$></a></h1>
  </MainOrArchivePage>
  <Blogger>
   <ItemPage>
    <h1><a href="https://yournewblogname.wordpress.com/?blogger=<$BlogItemPermalinkURL$>"><$BlogItemTitle$></a></h1>
    <$BlogItemBody$>
   </ItemPage>
  </Blogger>
 </body>
</html><$BlogPageTitle$>

– Ritesh Kumar Gupta

Disclaimer: “The postings on this site are my own and don’t necessarily represent IBM’s positions, strategies or opinions.”