Skip to main content

How to redirect old blogger blog links to new web address - Blogger Tips

How to automatically redirect old blogger blogspot links to new blogger web address - Blogger Tips

This topic helps you to know how to redirect from your-old-blog-address.blogspot.com to your-new-blog-address.blogspot.com so that the visitors who comes through the search engines or backlinks to old blog can view the content on new blog.

Recently I had changed my old blogger website php-techi.blogspot.com to techqube.blogspot.com and this caused a significant cut in traffic to the new site. Since all the pages from my old site were indexed by google, changing to the new address had caused a great decline in the traffic and I dont want to lose the visitors. I checked for any sort of option that blogger provides to redirect it automatically to new address, but could not find any. but there are options to redirect to pages with in a blog.

After some research I could find the following conclusions.

Please note : I am explaining based on the above mentioned old and new blog addresses that are php-techi.blogspot.com and  techqube.blogspot.com respectively

When we rename a blog, when a user tries your old link, then he will be getting a "Blog doesn't Exists, but not available for registering" message. that means, the owner of the old blog can use the same  blog address for any of his blogs or create a new one with the same name.

So what I did was creating a clone of new blog, gave the blog the old address

To clone new site you have to download the new blog (techqube.blogspot.com) in xml format by using the export option ( techqube.blogspot.com >> Settings >> Other >> Export Blog)

Create a new blog with old blog address (php-techi.blogspot.com) and upload(import) the blog data in xml format from the above step to the blog using import option ( php-techi.blogspot.com >> Settings >> Other >> Import Blog)

Now here a clone site (php-techi.blogspot.com) is created from new site ( techqube.blogspot.com )

Next step is to remove the comment option in clone site, for that go to the Layout option of php-techi.blogspot.com edit the Data block and disable the comment section.

Next is to edit the Template HTML. for this go to php-techi.blogspot.com >> Template >> Edit HTML
then add following codes with in the <head> ...... </head> block


the following script redirect the old blogger web url path to new path

<meta http-equiv="refresh" content="4;URL=http://techqube.blogspot.com/" />


<script>
var pagelink="";
var myurl=document.URL;
myurl=myurl.replace("http://","");
myurl=myurl.replace("https://","");
var firstslashIndex = myurl.indexOf("/");

if( firstslashIndex > 0 ){
var firstcharloc= firstslashIndex + 1;
var pagelink= myurl.slice(firstcharloc,myurl.len);
document.location.href="http://techqube.blogspot.com/"+pagelink;
}else{
document.location.href="http://techqube.blogspot.com/";
}
</script>

the above given JS script does the following:

1. remove the protocol part from the string
2. find first occurence of "/"
3. Add 1 to the first occurence position that we get in the above step
4. get the substring of the absolute url starting from the position given from the above step till the end of the string

the above steps are implemented in simple JS code snippet


After adding the codes, Click on "Save Template"

Now try any of the old blog links, it will be redirected to your new blog.

Please note : change "http://techqube.blogspot.com" in the script with your new address.

From my example site, here you can see the effect

try to access following url : http://php-techi.blogspot.com/2013_08_01_archive.html
this will be redirected to my new blog address
http://techqube.blogspot.in/2013_08_01_archive.html

hope this helps :) Please post you comments and suggestions.‎



Related posts:

  1. How to create a blogger landing page which will redirect to other pages based on the query string? 
  2. How to automatically redirect the blogger 404 error page to search page based on the keywords in failed url?   
  3. How to add BlogIt button or Widget on your blogger website 
  4. How to escape HTML scripts and JS codes for placing in blogger templates  
  5. How to add Google PlusOne (g +1) Button on blogger pages?  
  6. Articles on Blogger tools, features and tips

Popular posts from this blog

Sachin Tendulkar's emotional farewell Speech at Wankhede Stadium, Mumbai - Full Text and Video

Full Text and Video of Sachin Tendulkar's emotional farewell Speech on Nov 16, 2014 On November 16, 2013 - Sachin Ramesh Tendulkar played his last international cricket match against West-Indies at the at Wankhede Stadium, Mumbai. After the match he gave an emotional farewell speech. No one would be able forget the speech. The eyes of the gathered people were tearfull. Through out the speech Sachin thanked each and everyone who supported and encouraged him to build up his glorius career which spanned 24 years.

How to loop through the items in a select box using Javascript?

Looping through the items in a select box using JS Use the code given below to parse through the options in a select box and alert the Text and Value of each options. you can alter the function as per your need. sample code is given below: <form> <select id="test" name="test"> <option value="First Value" >First Text</option> <option value="Second Value" >Second Text</option> <option value="Third Value" >Third Text</option> <option value="Fourth Value" >Fourth Text</option> <option value="Fifth Value" >Fifth Text</option> </select> <input type="button" value="Check" onclick="loopSelectBox('test')" > </form> <script> function loopSelectBox(selectBoxId){ var obj=document.getElementById(selectBoxId); for(i=0; i < obj.options.length ;i++){ alert("Value :...

Autobiography by Cricket legend Sachin Tendulkar "Sachin Tendulkar - Playing it My Way : My Autobiography"

Autobiography by Cricket legend Sachin Tendulkar Cricket batting legend Sachin Ramesh Tendulkar's  autobiography was released on November 5, 2014 in a high profile launch function in Mumbai. . Earlier  on his Twitter page Sachin has announced the release date of his Autobiography " Sachin Tendulkar - Playing it My Way : My Autobiography "   as November 6th 2014 , but the book was released a day earlier. It took three years to write this book which he says as the Second innings of his life. Sachin Ramesh Tendulkar, the all time Genius of World Cricket was born on April 24, 1973 at Bombay (now Mumbai) in Maharashtra. He hold the record for scoring most runs and hundreds in Tests and ODIs. He scored a total of more than 34000 runs from One day Internationals (ODI's) and tests. He was part of the World cup winning team of 2011. He was a great all rounder. His  debut match was against    Pakistan  at Karachi during Nov 15-20, 1989. He played h...


Urgent Openings for PHP trainees, Andriod / IOS developers and PHP developers in Kochi Trivandrum Calicut and Bangalore. Please Send Your updated resumes to recruit.vo@gmail.com   Read more »
Member
Search This Blog