How to redirect a blogger blog link to another website or blog link

You might encounter an issue with one of your websites or blogs and wish to redirect a link to another site without using PHP, as Blogger platforms do not allow the use of this programming language. Instead, you can utilize JavaScript for redirection. This method involves creating a page redirection code, rather than just changing the link.

How to Redirect a Blogger Blog Link to Another Website or Blog

How to Redirect a Blogger Blog Link to Another Website or Blog

What makes this approach great is that it allows requesting and directing the visitor to the exact content they intended to access. For instance, if someone requests a specific topic, the redirected link will match that topic precisely, rather than just directing them to the domain. This includes files, values, and topics within the link that we want to guide the visitor to and lead them to the desired page on the old site to the new one.


For example, let's assume we want to change the link from ki1q.blogspot.com to http://borsippa.com, and the link the visitor requested is: ki1q.blogspot.com/2023/08/GPTBot.html
We want to redirect and modify it to look like this:
https://www.borsippa.com/2023/08/GPTBot.html
As you can observe, we're not only redirecting the visitor to the homepage of the site, but precisely guiding them to the desired content.

Code to redirect a Blogger blog to a link to another website or blog

Most individuals aim to direct users and visitors to the desired page, which requires using programming code to achieve this goal. This is the objective of this topic, which we will achieve using the JavaScript programming language permitted in blogs.

If you're using a private website, you'll find the process easy using PHP codes. However, we've created a JavaScript code after the need arose to redirect our Blogger blog link to another URL, and you can implement this code within an HTML page.


How to add a redirect code to the blogger:

  • Access your blog, then from the sidebar, select "Theme" and choose "Edit HTML". 
  • Then, look for the <head> tag, and right below it, copy and paste the following code.

<script>
var url = window.location.toString();
window.location = url.replace(/texekar.blogspot.com/, "karraraliraqii.blogspot.com");
</script>


«Change texekar.blogspot.com to your main blog link.

»Replace karraraliraqii.blogspot.com with the URL of the new website or blog that needs redirection.

Code to redirect a Blogger blog to a link to another website or blog

This is how you can redirect any Blogger blog to any link you need, whether it's your new blog and you want to redirect visitors to it, or you can redirect your old blog link to a new website, Facebook, and others. I hope you understood what we explained. Best of luck to you.
Kar
By : Kar
Online content writer and chartered accountant .
Comments