Web Developing Talk  

Go Back   Web Developing Talk > Design and Development > Website Design & Management

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 03-11-2010, 07:54 PM
sharfuddin sharfuddin is offline
Regular Member
 
My Social Networks:

Join Date: Feb 2010
Location: Bangladesh
Posts: 30
Thanks: 3
Thanked 0 Times in 0 Posts
sharfuddin is on a distinguished road
Default How to Redirect Your Blogger Blog to Another Domain Name (Including Individual Posts)

Firstly, please note that this tutorial will be a step by step howto for Blogger blogs but will work on any other html blogs too.

This post will be dealing with 3 major aspects of redirecting a blog to another one:

a) How to redirect visitors to the old blog automatically to the new pages.
b) How to transfer the PageRank of your old blog to the new one.
c) How to prevent being penalized by Google for duplicate content.

How to redirect visitors to the old blog automatically to the new pages.
The first thing to do is export your blog, then import it to the new blog. Then, on the old Blogger blog, to to your Layout > Edit HTML and between the <head> </head> tags, put this:
Code:
Code<#>
<meta content='4;url=http://yournewblog.com/' http-equiv='refresh'/>

Where "4" is the number of seconds before the redirect and http://yournewblog.com/ is the address of the blog you want to redirect to.

Now we must redirect individual posts which is a bit tricky since we cannot add a 301 permanent redirect on the Blogger server. So, to achieve individual posts redirect (meaning: each individual post will redirect to it's corresponding post on the new blog), insert the following code right after <b:section class='main' id='main' showaddelement='no'> in your template:

Code:
Code <#>
<b:widget id='Redirector' locked='true' title='Blog Posts' type='Blog'>
<b:includable id='main'>
<b:if cond='data:blog.pageType == "item"'>
<b:loop values='data:posts' var='post'>
<script type='text/javascript'>
var new_page='yournewblog.com/';
var permalink = '<data:post.url/>';
var timestamp = '<data:post.timestamp/>';
timestamp = timestamp.split('/');
timestamp = timestamp[2]+'/'+timestamp[0]+'/'+timestamp[1];
new_page = permalink.replace(/youroldblog\.blogspot\.com\/2007\/[0-9]{2}/,new_page+timestamp);
new_page = new_page.replace(/\.html$/,'');
document.location.href = new_page;
</script>
</b:loop>
</b:if>
</b:includable>
</b:widget>
Obviously, replace yournewblog.com with the address to the blog you want to redirect to.

Important: if importing to Wordpress, all your posts should have been imported to Wordpress.com using their Manage/Import function. The creation dates of all posts must match, because they are part of the permalinks.

Now that the redirect has been set, we must make sure Google doesn't find our old blog as duplicate content to the new on:

Remove duplicate content
Insert the following between the <head> and </head> tags of your old blog:

Code:
Code<#>
<meta name="ROBOTS" content="NOINDEX, NOFOLLOW"/>
After seeing this, search engines should remove your old blog from their cache and the old content will stop existing for them. Therefore they are not going to penalize your new blog for duplicate content.

Display a message on your old blog, before the redirect occurs

This is an optional step. You can use it to tell your readers that you have moved your blog, why or... whatever you want.

To do this, go to your old blog's Layout > Edit HTML and insert the following code right after the <body> tag:

Code:
Code <#>

<div style='position: absolute; top: 30px; left: 30px; border: solid 2px #333; color: #000; background-color: yellow; padding: 5px; width: 400px; z-index: 5; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: large;'>
<p><strong>My blog has moved!</strong></p>
<p>You will be automatically redirected to the new address. If that does not occur, visit<br/> <a href='http://yournewblog.com/'> <strong>http://yournewblog.com</strong></a> <br/> and update your bookmarks.</p>
</div>
__________________
www.mystudytable.com

Last edited by sharfuddin; 03-11-2010 at 07:57 PM.
Reply With Quote
Reply

Tags
blog, blogger, domain, including, individual, posts, redirect

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:20 PM.


 
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd. Web Developing Talk
Inactive Reminders By Mished.co.uk and FTP-Anime.com