How to automatically redirect Blogger blog to another blog or website

You can redirect your specific post URL to another post or page, all 301 or 302 redirection within your blog. 

That will be useful for redirecting 404 error pages and broken links; however with that you cannot redirect homepage to any particular URL. Here we will show you how to automatically redirect Blogger blog to another blog or website or any URL. So with this technique you can redirect your Blogger Homepage or any particular page to external websites.

This will be useful if you have just migrated to new domain with new blogging platform. Usually you won’t get much traffic to your new blog when you just shifted. Also your old blog will have some decent traffic flow from organic search results as well as from backlinks. So by using this method you can drive traffic from your old blog to your new blog and also it passes all the ranking factors.


Redirect Page To Page 

- go to settings::Errors and redirects::Custom redirects

- click Custom Redirect and add page that you want to redirect

Note:

There is a permanent option below the To URL, you can check the permanent option to setup 301 redirection on Blogger, leave it unchecked to create 302 redirection on Blogger.

Do not enter the full URL in the From or To field. Just omit the main domain name in the full URL and enter sub directory name and file name, such as /2021/02/redirect-blog-URL.html. Also you can not redirect Blogger URL or post to external links.


Using JavaScript

  1. Login to your Blogger dashboard
  2. Go to template and click edit HTML
  3. Now you can see template codes. Press CTRL + f and then find <head>
  4. Now add the following code between <head> and </head>
<script>
window.location="http://www.yourdomain.com";
</script>

dont forget to replace the red text with your domain.

this method will redirect the whole pages to yourdomain.com


Redirect with custom filter

You can filter which page that will be redirect to your domain.

<script>

var s = window.location.href;

if(s.indexOf("windows") != -1)

    window.location = "http://www.yourdomain.com/windows.html";

</script>

 this method will redirect all pages with url : "http(s)://*windows%" to yourdomain.com/windows.html


Redirect Page With Parameter

You can redirect to another domain with the same page and parameter. 

<script>

  var s = window.location.pathname;

  var ar = s.split('/');

  s = 'http://www.yourdomain.com/'+ar[ar.length-1];

  window.location = s+window.location.search;

</script> 

This method will redirect all pages to another domain with the same parameter.

eg: https://frxangelz.blogspot.com/2021-01-01/test.html?act=what 

will be redirected to

http://www.yourdomain.com/test.html?act=what

note: the path is not included, only the page(html) with it's parameter.

youtube video






5 comments

Hi, mam, kindly tell, how can I do 301 redirect from my old blogspot blog to mynewsite.com

Reply

Thanks, tested it and works fine :)

Reply

Not working for me. Could you please help. I'm trying to redirect the old (.blogspot) to the new one (.com) site.

Reply

Thanks I was able to write this with your information:

>script<
var wlh = window.location.href;
var sp_wlh = wlh.split('?');

if (!sp_wlh[2]) { sp_wlh[2] = ''; t = ''; } else t = '?';
blah = 'https://www.videohostingsite.com/embed/' + sp_wlh[1] + t + sp_wlh[2];
window.location = blah;
>/script<

Passing the name of my blog with the reference number of a video to share will create an automatic redirect from a social media post link.
e.g.
myblog.blogspot.com/year/month/video.html?randomvideoletters?t=123

will pass the video reference and start the video at 2:03.

Reply

Post a Comment