Migrate your blogger to new wordpress domain

If you are going to migrate your blogger to new wordpress domain then you should preferring of doing 301 redirect your old post to the new domain. But for doing this you much have proper knowledge, otherwise you will loose your traffic.

To 301 redirect your old blogger posts to the new domain follow the simple steps below:

1. Open your Blogger Dashboard and go to Blogger layout Section, there edit HTML.

2. Search for <head>, just below add the following javascript:

<script type=’text/javascript’>/* * Written by Danny Ng * Free to use and distribute but must keep this comment in place. */var post_regex = /^http://(www.)?.*.blogspot.com/d{4}/d{2}//;var month_archive_regex = /http://(www.)?.*.blogspot.com/d{4}_d{2}_d{2}_archive.html/;var year_archive_regex = /updated-min=d{4}/;var label_regex = /search/label/.+/;var old_root_domain = ‘http://nichewp.blogspot.com’, new_root_domain = ‘http://www.nichewp.com’, tag_url = ‘/tag/’, redirect_suffix; if (post_regex.test(location.href))    redirect_suffix = (location.href.search(/www/i) == 7) ? location.href.substring(old_root_domain.length+4, location.href.length-5) : location.href.substring(old_root_domain.length, location.href.length-5); // -5 to strip .htmlelse if (month_archive_regex.test(location.href)){    redirect_suffix = (location.href.search(/www/i) == 7) ? location.href.substring(old_root_domain.length+4, location.href.length-16) : location.href.substring(old_root_domain.length, location.href.length-16); // -16 to strip _XX_archive.html    redirect_suffix = redirect_suffix.replace(/_/g, ‘/’);}else if (year_archive_regex.test(location.href)){    redirect_suffix = year_archive_regex.exec(location.href).toString();    redirect_suffix = redirect_suffix.replace(/updated-min=/, ‘/’);}else if (label_regex.test(location.href)){    redirect_suffix = label_regex.exec(location.href).toString();    redirect_suffix = tag_url + redirect_suffix.split(‘/’)[2];}else    redirect_suffix = ”; document.write(“<meta content=’0;URL=” + new_root_domain + redirect_suffix + “‘ http-equiv=’refresh’/>”);</script>

3. From the above code, replace http://nichewp.blogspot.com with your blogspot url. And http://www.nichewp.com with your new wordpress domain.

Remember: Please avoid using (/) at the end of new wordpress domain.

Share your thoughts