Skip to main content

New Way to Redirect Blogger to WordPress

New Way to Redirect Blogger to WordPress

May 01, 2013 at 11:16PM

Is there an easy way to redirect Blogger to WordPress with htaccess 301 redirects and canonical urls? We also started this blog on Blogger in 2004 and then migrated to WordPress in 2006. Long time readers will be aware of our challenges in making this major switch of a popular blog to a very new domain name.  But being on our own domain name and paid hosting server has been a very useful step towards site freedom and full server control.

Blogger to WordPress

So what is the way we switched from Blogger to WordPress?  While we kept the blogger blog live for many years, it was lot of duplicate content as we had migrated all posts to our domain name. Later we shortened the content, sometimes also tried a single page template with list of links to pointing to most visited articles, a big search box for new links –  but readers would simply not click through to the new pages and there was very high bounce rate.

redirect traffic

For some time we have set up the blogger blog such that links for the relevant articles redirect to same articles on main site. We found the following process resulted in better user experience as it let visitors be redirected to the actual posts from previous links. We tried to keep the SEO advantage of the links by pointing to the canonical urls.

I seek your valuable feedback if this a good technique.

Blogger Template Code

Here is the sample template code we use on our Blogger blog. Paste all the following code which we have tried to explain stepwise into the Blogger theme template.

First is the starting HTML code as used for any page.

  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  <html>  <head>  

Now here is the canonical code which tells that the main blogger page is now on a new url.

  <MainPage><link rel="canonical" href="http://www.quickonlinetips.com/" /></MainPage>    

Now we add the canonical tags for the item pages. Note here we have not used the permalink of the final url, but instead used the domain.com/ItemNumber  for the url. Blogger assigns each post a unique number and we take advantage of that.

  <Blogger><ItemPage>  <link rel="canonical" href="http://www.quickonlinetips.com/<$BlogItemNumber$>" />  </ItemPage></Blogger>  

Now to add the script to redirect the main blogger page to your domain name and each item page to your Domain.com/ItemNumber.

  <script type="text/javascript">  <MainOrArchivePage>window.location.href='http://www.quickonlinetips.com/';</MainOrArchivePage>  <Blogger><ItemPage>  window.location.href='http://www.quickonlinetips.com/<$BlogItemNumber$>';  </ItemPage></Blogger>  </script>    

Now to add the title of the page for each page.

  <title><$BlogPageTitle$></title>  

Close the Head tags and start the BODY tags

  </head><body>  

Now to add h1 tags to the page which is linked to the main page or the blog post page. Added move notice to support noscript cases. Again linked via Blog ItemNumber.

  <p>This page has moved to a new address.</p>  <h1>  <MainOrArchivePage><a href="http://www.quickonlinetips.com"><$BlogTitle$></a></MainOrArchivePage>  <Blogger><ItemPage>  <a href="http://www.quickonlinetips.com/<$BlogItemNumber$>"><$BlogItemTitle$></a>  </ItemPage></Blogger>  </h1>  </body></html>  

Full Code: Here is the complete code to cut and paste to your Blogger template. Remember to change your code for your domain name.

  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  <html><head>    <MainPage><link rel="canonical" href="http://www.quickonlinetips.com/" /></MainPage>  <Blogger><ItemPage>  <link rel="canonical" href="http://www.quickonlinetips.com/<$BlogItemNumber$>" />  </ItemPage></Blogger>    <script type="text/javascript">  <MainOrArchivePage>window.location.href='http://www.quickonlinetips.com/';</MainOrArchivePage>  <Blogger><ItemPage>  window.location.href='http://www.quickonlinetips.com/<$BlogItemNumber$>';  </ItemPage></Blogger>  </script>    <title><$BlogPageTitle$></title>  </head>  <body>  <p>This page has moved to a new address.</p>  <h1>  <MainOrArchivePage><a href="http://www.quickonlinetips.com"><$BlogTitle$></a></MainOrArchivePage>  <Blogger><ItemPage>  <a href="http://www.quickonlinetips.com/<$BlogItemNumber$>"><$BlogItemTitle$></a>  </ItemPage></Blogger>  </h1>  </body></html>  

This code does 3 things -

  • Canonical urls – which points to a domain url, which will eventually 301 redirect to the correct page. Note Google allows Cross domain canonical urls, which means you can point canonical urls from one to another domain to avoid duplicate content.
  • Redirects – The window in the browser refreshes to a new url and wordpress htaccess will eventually redirects the url to the new wordpress url. The user notices  no change in the browser and has nothing to click to the new url.
  • h1 tags – there are h1 tags which points to redirecting link with the blog / post title.

WordPress 301 Htaccess Redirects

Now all the urls will redirect to domain.com/ItemNumber. Now we will use the .htaccess on the domain name (which is under our control) to create 301 redirects from these Domain.com/ItemNumber urls to the appropriate post. Note we need to one redirect for each url, so if you have a large number of posts, you need to add all those redirects for them to work seamlessly.

Here is a snapshot of the htaccess codes in our file.

blogger htaccess redirect code

Basically you need to add in each line one redirect for each blog item number. Note that the .htaccess is a very powerful file in your server root folder which can bring your site down if not configured correctly. Always keeps htaccess backup before editing it.

  redirect 301 /ItemNumber http://domain.com/url/  redirect 301 /ItemNumber2 http://domain.com/url2/  redirect 301 /ItemNumber3 http://domain.com/url3/  

Here is what the code does - 

  • Redirects users automatically from  main blogger page to your domain name
  • Redirects users automatically from each individual blogger url to the final WordPress url.
  • Puts canonical urls in place. The canonical url points to a url, which has a 301 redirect to the final url.

Does this code work? Test these redirects from our older blogger blog to our domain name.  This is good way if you want to completely move your blog to a new domain name and want a seamless transition of urls from Blogger to WordPress. If you are very concerned about SEO, Pagerank, traffic issues, please seek professional support on this.

pchere.blogpsot.com
pchere.blogspot.com/2005/02/absolutely-delicious-complete-tool.html

Remarks

Note: Server side 301 redirects are the best way to redirect urls, along with passing pagerank. But blogger does not provide access to htaccess or server side redirects, so we use Javascript redirects  - but note many do not recommend such redirects and they might not pass pagerank. There is no guarantee that search engines will honor the url suggestions by canonical urls linked in this way. We leverage the control of .htaccess 301 redirects (which is a good way) to redirect these urls further.

Warning: This will make the blogger blog and all its urls disappear from search engines, since they are now redirecting to new urls. So do this only if you are really ready for this. Also note incorrectly editing htacccess  may take your site down.

Warning: This code is NOT approved by Blogger, Google, or anyone else. Please use this code AT YOUR OWN RISK. We don’t claim to be an expert on this can cannot provide support or predict in any way how it will affect your ranking, pagerank, indexing etc and bear no liability whatsoever.

IMPROVE THIS CODE – I seek your opinions and viewpoints on this technique. What are the drawbacks here and how can this code be made better. Post a comment.

Original article: New Way to Redirect Blogger to WordPress

©2013 QuickOnlineTips (QOT). All Rights Reserved.



from Quick Online Tips http://www.quickonlinetips.com/archives/2013/05/redirect-blogger-to-wordpress/

Comments

Popular posts from this blog

Ten Apps you Must Download when you Buy A New Android Smartphone

Ten Apps you Must Download when you Buy A New Android Smartphone

May 14, 2013 at 11:21PM You have spent loads of time researching which is the best Android smartphone that fits your budget, spoken to people in the know about gadgets and have saved accordingly. After contemplating a fair bit if this is the right time to pick a device and there is no other device you would rather have, you take a plunge into the astonishing world of Android and pick that shiny new Android device. Right now it is sitting proudly in your hands as you admire every curve, every pixel, visible or not of your new Android smartphone.It is the time to load your Android smartphone, to make it truly yours, a device that would be with you through your thick and thin. Time to install those applications which will complete your world, if not complete, at least make your world a lot more organized and a lot more fun. So which apps do you start off with?Like the famous Nokia commercial goes, you have our back. Here …

How to Password Protect & Encrypt Files [Mac/Windows]

How to Password Protect & Encrypt Files [Mac/Windows]

May 16, 2013 at 06:33PM Nowadays, the computer has a very important place in everybody’s life, as a personal gadget used for a lot of different things. Everything is digital and it is stored on a computer’s hard-disk or on a cloud system, offering you easier access to your favorite data.Computers have become the place where you hold pictures, documents, favorite music and everything else in the same place. While storing may include regular data, random and even useless information, people may also keep important stuff, such as wedding photos, work documents, projects and others.Have you ever thought about protecting critical data with a password? Taking into consideration that all information could be vulnerable to hackers or to unauthorized persons, this is a rather obvious procedure. Another reason to encrypt data can appear in case somebody else also uses that computer and you don’t want them to have access to private pict…

Who Needs To Pirate Software With A Free Software List Like This!

Who Needs To Pirate Software With A Free Software List Like This!

May 03, 2013 at 05:30AM I found this interesting list at this random forum on Internet and I found it worth sharing. It is indeed a huge list of free available software that you can use instead of buying or pirating the expensive ones. The list goes as following:3D Graphics:3Delight Free – http://www.3delight.com/index.htm
Anim8or – http://www.anim8or.com/
Aqsis – http://www.aqsis.com/
Blender – http://www.blender3d.org/
Houdini (Free Edition) – http://www.sidefx.com/apprentice/index.html
Now3D – http://digilander.libero.it/giulios/Eng/homepage.htm
OpenFX – http://www.openfx.org
POV-Ray – http://www.povray.org/
SOFTIMAGE|XSI EXP – http://www.softimage.com/products/exp/v3/
Terragen – http://www.planetside.co.uk/terragen/
Toxic – http://www.toxicengine.org/
Wings 3D – http://www.wings3d.com/Anti-Virus:a-squared – http://www.emsisoft.com/en/software/free/
AntiVir – http://www.free-av.com/
Avast – http://www.…