Blog Redirection. ~ The Blog Doctor.

Blog Redirection.

New Visitor? Like what you read? Then please subscribe to my Blog Feed or sign up for Free Email Updates. Thanks for Visiting!

Lots of blogs are being redirected to other sites to attract traffic. These blogs usually have a title designed to attract attention and when viewers click on the blog link they are redirected to other sites.....

For example one blog was named "A Hot Girl's Page..." and was redirected to "Nancy Live on Cam". I was interested in this phenomenon and decided to investigate how it was done. I pasted the url for "A Hot Girl's Page..." in my browser and stopped the browser just before it redirected. I then looked at the page source for this blog by going to View----->Page Source in Firefox. This blog only had one post in it. I scrolled down the page source and came upon this code in the posts section :

<div class='post-body'>

The single post in the blog had no content and this code was pasted within that post. Nothing showed up in the blog page because there was no other content. This code caused the browser to be redirected to the DESTINATION SITE without any delay.
Do not try to search for this blog since it has been deleted by Blogger.

The importance of redirection lies in the fact that your own blog may be hacked and all traffic redirected to other sites. To avoid this it is important to see the methods used for redirection.


This is the method used in the above example. The following code is used :

<meta http-equiv="Refresh" content="0; url=">

This code is pasted in the blog post or in the <head> section of the template. This causes the blog to redirect to even when the browser has Javascript disabled. To delay the redirection a number is put after the "content=" like this :

<meta http-equiv="Refresh" content="5; url=">

The delayed redirect has the advantage that you can place an extra message, such as “The page you are looking for changed location… You will be redirected automatically to the new location”


This is the other method used. It does not work if Javascript is disabled in viewer's browser. The following code is pasted in the <head> section of the template.


EXTERNAL JAVASCRIPT can also be used to redirect your blog. The way this works is that you may wish to incorporate a hack in your blog. You are then asked to paste this line above the </head> tag in your template :

<SCRIPT language="JavaScript" SRC="http://URL OF HACK SITE/jshack.js"></SCRIPT>

The jshack.js file is located at http://URL OF HACK SITE/ and contains the redirect code. You can see the full code when you type the whole address for the file in the address bar and press Enter.
To prevent this type of redirection do not add such codes in your template unless they come from a trusted site. You can also download the JS file and add the whole code instead of a link to the file.


You can alert your viewers that they are being redirected using this Javascript code :

alert("This page has been moved to a new location... click OK to be redirected?");
location = "";

To use a confirm dialog use this code :

if(confirm("This page has been moved to a new location... would you like to be redirected?"))
location = "";


Scripts embedded in Flash are also responsible for redirecting sites. Hence be careful when adding flash content to your sites. MySpace sites were redirected using Flash. Click here for more details.


Though PHP is not used in Blogger for the sake of completion PHP redirects are done using this code :

header( 'Location: URL OF DESTINATION' ) ;


All the above methods are used by hackers to redirect traffic from a blog with a high Page Rank to their site. These methods are recognized by search engines and can result in getting your site banned. Hence make sure to protect your blog by having strong passwords so that no one can hack into it and place these codes in your template. In case you do get complaints fro viewers that your blog is being redirected look for these codes and delete them from your template and change your passwords.


This is the best method to prevent you from being penalized by the search engines. Unfortunately it cannot be used on Blogger. However, you can use it to redirect on ftp blogs. To do this locate your .htaccess file in the root directory of where all your web pages are stored. If there is no .htaccess file there, you can create one with Notepad or a similar application. Add the following lines after leaving a space after all the code :

redirect 301 /folder/page1.htm

where /folder/page1.htm represents the original page and represents the destination page. Leave the spaces as they are after 301 and before destination site URL. The 301 redirect is the safest way to preserve your rankings. On the next indexing, the search engine robot will obey the rule indicated in your .htaccess file and index the new page name every time a link or its internal database tries to access the old page. If your site is hosted on a Microsoft IIS server then do this: In internet services manager, right click on the file or folder you wish to redirect. Select the radio titled “a redirection to a URL”. Enter the redirection page, check “The exact url entered above” and the “A permanent redirection for this resource”. Click “Apply”.

Technorati Tags:, , , ,


Naija Vixen said...

This was very helpful, thank you so much!

petros said...

hi i tried to use this to redirect my blog to the url of a label. I used the html version and it didnt work and the javascript version made the browser refreshing constantly.
any ideas how to make this happen?

Vin said...


What is the blog address where you used this? Let me know after you have put in the code so I can test it.

petros said...

The blog is:

i tried to redirect to this from another blog and the script worked. for some reason when the script is used to redirect inside the same blog it doesnt work.

thanks a lot with this help

Vin said...


This may be due to the fact that blogger label URLs do not have a .html ending page. For example there is no such page :

petros said...

yes vin. this must be the reason. it is also perhaps the reason why i cannot use html code for the redirection.
THe javascript however works fine when it is directed in a different blog. Do you have any idea why this is happening? it must need something more in the code to prevent it from refreshing constantly. did you get that too when you tried?

Mike said...

Hi Vin,

Is it frowned upon to redirect blogs to other blogs? I want to register a few different Blogspot URLs that all redirect to my main blog in case of spelling mistakes in my web address etc.

Thanks in advance

Vin said...

Mike @ Hunter Boot Ltd,

Instead of that buy an easy to remember domain name from Google ($10 only) like (if it is available).

Then you can create subdomains like :

and you can redirect each blog to respective subdomain.

המשחקיה said...

It seems that both the HTML and Javascript redirections no longer work in blogspot - I get an error message when trying to add the code that "Tag is not allowed"


Skip to top of post.

Search Blog Before Commenting


Post a Comment

Please use the above search box to search this blog before posting your valuable comments.

Comments posted on Dummies Guide to Google Blogger (Beta) are moderated and will be approved only if they are on-topic and not abusive. Try not to include website URLs/links in your comments. You can email me : drbhatns at gmail dot com for any blogging question. Thanks,


The Blog Doctor The Blog Doctor2 Blog Doctor Home


Tips On Blogger and Latest News.

Skip to top of post.