How to Create Automatic Safelink on Main Blogger Blog

How to Make Automatic Safelink on Main Blogger Blog
How to Make Automatic Safelink on Main Blogger Blog

Blogger is one of the most popular platforms for blogging, and many new bloggers use either Blogger or Blogspot. But Blogger, even though it's easy to use, isn't very flexible and lacks some tools that could make it easier for people to find the blog and visit it as much as possible.

Blogger doesn't have as many tools or plugins as WordPress does that can help make a blog look better and get more people to visit it. This makes it harder to build an audience.

Template scripts like "safelinks" or "automatic download redirect" are known to bring in more page views and money for websites or blogs that are trying to make money. When we want to use these safelinks on Blogger, we always have to start or make a new blog so that all download links can be redirected there. This helps us get more page views and make more money.

Now, hopefully, you won't have to make a new blog for this. In today's article, I'll show you how to set up an automatic safelink redirection on your Blogger blog without making a new blog for safelink.

What is a Safelink and How does it works?

A Safelink template or script is only a collection of JavaScript codes made to automatically sync or embed any link into text or a post in order to encrypt it.

When someone tries to access a link that has been encrypted with a set of codes, they must go through a Automatic safelink on main blog to obtain the link. Frequently, the safelink will request that you wait a short while before you can access the link you are trying to access.

In order for the owner of the website to earn page views and money from visitors and for visitors to find the link or the material they were looking for on the website, Safelink assists both parties (both client and visitor).

Types of Blogger Safelinks

On Blogger, there are two kinds of safelinks: Template safelink and Automatic page safelink.

The Safelink template is its own website, and links are typed in by hand into the required field to shorten them.

A Automatic safelink page is a page that has a code on it that calls a code that is already on the website's html section. This safelink automatically shortens all links that aren't listed in the section for domain exceptions.

Some developers have changed some templates so that these two types of templates are now all in one. We have median ui 1.4 or median ui 1.5 safelink template. The code of this blog site's template has been changed, and the safelink feature has been added. If you want to find a template like this, you can visit BlogrTool

How to Make Auto Safelink on Main Blog?

It's very easy to set up an Auto-safelink for main blog. You only need to put three sets of codes on a page you make on your blogger dashboard, one between the <head></head> tags and the other between the <body></body> tags. So, we'll do it in three parts. Let's do it right away.

Section 1: Installing the page code

Step 1: Go to your Blogger Dashboard. Click on Pages in the menu on the left.

Step 2: Make a new page and give it any name you like. But since we are making a safelink, I think you should name your page something like "safelink" or "download." Copy and paste the code below, as shown in the picture below, in the HTML section.

Step 3: Copy the code below and paste it in your safelink page html section

<div class='separator' style='text-align:center'> 

<div class='ads-top'> 

<!-- Enter your Ad code here --> 

</div>   

<div class='safelink' id='safelink'>  

<center>  

<div class='button outline' id='daplong'> Wait a minute...</div>  

<script>/*<![CDATA[*/ var currentURL=location.href; var str = currentURL; var res = str.replace('https://www.your_domain.com/p/safelink.html' + '?url=', ""); function changeLink(){var decodedString = Base64.decode(res); window.open(decodedString,'_blank')}; document.write('<a href="#go-link" id="download-safelink" class="button outline">Click to get link</a>'); var linkDL = document.getElementById("download-safelink"); var notif = document.getElementById("daplong"); var waktu = 15; var teks_waktu = document.createElement("span"); linkDL.parentNode.replaceChild(teks_waktu, linkDL); var id; id = setInterval(function () { waktu--; if (waktu < 0) { teks_waktu.parentNode.replaceChild(linkDL, teks_waktu); clearInterval(id); notif.style.display = "none"; linkDL.style.display = "inline-block"; } else { teks_waktu.innerHTML = "The link will appear in " + waktu.toString() + " seconds"; }}, 1000); /*]]>*/</script></center> </div>   

<div class='separator-text'> 

<!-- Article Content Here --> 

</div>   

<div class='blockLink' style='text-align:center'>  

<div id='ads-left' class='ads-left'> 

<!-- Enter your Ad code here -->       

</div>   

<div id='go-link'> <a class='button' href='javascript:void(0)' onclick='changeLink();' rel='nofollow noreferrer'>Go to Link</a>  

</div>   

<div id='ads-right' class='ads-right'> 

<!-- Enter your Ad code here -->     

</div>

</div>
Step 4: Change the link https://www.your domain.com/p/safelink.html in the code above to the link to your safelink page. Or, if your page is called Safelink, just change your domain.com to your own domain. When you're done, put your page online. Replace "!—Enter your Ad code here" with your own Ad code and "!—Article content Here" with your Article.

Section 2: Adding Script in <head></head> tag

Step 1: Go to your blog's dashboard and click on Theme. Next, click on the orange button that says CUSTOMIZE and choose Edit HTML from the drop-down menu.

Step 2: You'll be taken to the html part of your blog. To use the find function, click anywhere on the code and then press Ctrl + F. You'll see a small bar above your site's HTML where you can type </head> to find the </head> tag. Here is where you should put the code that follows. In some templates, you need to look for the &lt;/head&gt; tag. This is the code for things like the median ui template. These are the newest templates, and the html and js codes have been parsed so they load quickly.

Step 3: Place the code below before the </head> tag.

<!-- Code to put before </head> tag -->

<style> 

  /* Safelink */ 

.button-outline{background-color: #086978;color:white; box-shadow: 0 2px 5px 0 rgba(0,0,0,.1);font-size:20px; font-weight:bold;width:responsive; border-radius:5px} 

.safelink span{display: block;font-size: 18px; color:red} 

.blockLink{display: flex;display: -webkit-flex;flex-wrap: wrap;-webkit-flex-wrap: wrap;align-items: center;-webkit-align-items: center} 

.blockLink &gt; div{display: block;width: 35%;} 

.blockLink &gt; div#go-link{width: 30%;} 

.blockLink &gt; div#go-link a{display: none;margin: 0} 

.blockLink &gt; div#go-link:target a{display: inline-flex} 

.ads-top{margin: 0 0 20px 0;text-align: center} 

#HTML99,#HTML99 .widget-content{border: 0 !important;margin: 0 !important;padding: 0 !important} 

/* Responsive */ 

@media screen and (max-width: 768px){.blockLink &gt; div{width: 100% !important;margin: 0 0 15px;text-align: center}.blockLink &gt; div:last-child{margin: 0}} 

    </style> 

<script>/*<![CDATA[*/ var uri = window.location.toString(); if (uri.indexOf("%3D","%3D") > 0) { var clean_uri = uri.substring(0, uri.indexOf("%3D")); window.history.replaceState({}, document.title, clean_uri);} var uri = window.location.toString(); if (uri.indexOf("%3D%3D","%3D%3D") > 0) { var clean_uri = uri.substring(0, uri.indexOf("%3D%3D")); window.history.replaceState({}, document.title, clean_uri);} var uri = window.location.toString(); if (uri.indexOf("&m=1","&m=1") > 0) { var clean_uri = uri.substring(0, uri.indexOf("&m=1")); window.history.replaceState({}, document.title, clean_uri); } var uri = window.location.toString(); if (uri.indexOf("?m=1","?m=1") > 0) { var clean_uri = uri.substring(0, uri.indexOf("?m=1")); window.history.replaceState({}, document.title, clean_uri);}; var protocol=window.location.protocol.replace(/\:/g,''); if(protocol=='http'){ var url=window.location.href.replace('http','https'); window.location.replace(url);} /*]]>*/</script> 

Section 3: Adding script code in <body></body> tag

Step 1: Still in the HTML section of your blog, press Ctrl + F and type </body> to search for the body tag. Better yet, you can scroll down your blog's HTML until you see the </body> tag and put the code given below right before it.

<!-- Code to place before </body> -->

<script>/*<![CDATA[*/ var Base64 = {_keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", encode: function (input) {var output = ""; var chr1, chr2, chr3, enc1, enc2, enc3, enc4; var i = 0; input = Base64._utf8_encode(input); while (i < input.length) {chr1 = input.charCodeAt(i++); chr2 = input.charCodeAt(i++); chr3 = input.charCodeAt(i++); enc1 = chr1 >> 2; enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); enc4 = chr3 & 63; if (isNaN(chr2)) {enc3 = enc4 = 64;} else if (isNaN(chr3)) {enc4 = 64;} output = output + this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) + this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);} return output; }, decode: function (input) {var output = ""; var chr1, chr2, chr3; var enc1, enc2, enc3, enc4; var i = 0; input = input.replace(/[^A-Za-z0-9\+\/\=]/g, ""); while (i < input.length) {enc1 = this._keyStr.indexOf(input.charAt(i++)); enc2 = this._keyStr.indexOf(input.charAt(i++)); enc3 = this._keyStr.indexOf(input.charAt(i++)); enc4 = this._keyStr.indexOf(input.charAt(i++)); chr1 = (enc1 << 2) | (enc2 >> 4); chr2 = ((enc2 & 15) << 4) | (enc3 >> 2); chr3 = ((enc3 & 3) << 6) | enc4; output = output + String.fromCharCode(chr1); if (enc3 != 64) {output = output + String.fromCharCode(chr2);} if (enc4 != 64) {output = output + String.fromCharCode(chr3);} } output = Base64._utf8_decode(output); return output;}, _utf8_encode: function (string) {string = string.replace(/\r\n/g, "\n"); var utftext = ""; for (var n = 0; n < string.length; n++) {var c = string.charCodeAt(n); if (c < 128) {utftext += String.fromCharCode(c);} else if ((c > 127) && (c < 2048)) {utftext += String.fromCharCode((c >> 6) | 192); utftext += String.fromCharCode((c & 63) | 128);} else {utftext += String.fromCharCode((c >> 12) | 224); utftext += String.fromCharCode(((c >> 6) & 63) | 128); utftext += String.fromCharCode((c & 63) | 128); }} return utftext;}, _utf8_decode: function (utftext) {var string = ""; var i = 0; var c = c1 = c2 = 0; while (i < utftext.length) {c = utftext.charCodeAt(i); if (c < 128) {string += String.fromCharCode(c); i++;} else if ((c > 191) && (c < 224)) {c2 = utftext.charCodeAt(i + 1); string += String.fromCharCode(((c & 31) << 6) | (c2 & 63)); i += 2;} else {c2 = utftext.charCodeAt(i + 1); c3 = utftext.charCodeAt(i + 2); string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63)); i += 3;}} return string; }}; var encode = document.getElementById('encode'), decode = document.getElementById('decode'), output = document.getElementById('output'), input = document.getElementById('input'); var User_ID = ""; var protected_links = ""; var a_to_va = 0; var a_to_vb = 0; var a_to_vc = ""; function auto_safelink() {auto_safeconvert();}; function auto_safeconvert() {var a_to_vd = window.location.hostname; if (protected_links != "" && !protected_links.match(a_to_vd)) {protected_links += ", " + a_to_vd;} else if (protected_links == "") {protected_links = a_to_vd;} var a_to_ve = ""; var a_to_vf = new Array(); var a_to_vg = 0; a_to_ve = document.getElementsByTagName("a"); a_to_va = a_to_ve.length; a_to_vf = a_to_fa(); a_to_vg = a_to_vf.length; var a_to_vh = false; var j = 0; var daftarPostingan = [ "https://www.blogrtool.com/p/safelink.html" ]; var randomPostingan = daftarPostingan[Math.floor(Math.random()*daftarPostingan.length)]; var a_to_vi = ""; for (var i = 0; i < a_to_va; i++) {a_to_vh = false; j = 0; while (a_to_vh == false && j < a_to_vg) {a_to_vi = a_to_ve[i].href; if (a_to_vi.match(a_to_vf[j]) || !a_to_vi || !a_to_vi.match("https")) {a_to_vh = true;} j++; } if (a_to_vh == false) {var encryptedUrl = Base64.encode(a_to_vi); a_to_ve[i].href = randomPostingan + "?url=" + encryptedUrl; a_to_ve[i].rel = "nofollow noreferrer"; a_to_vb++; a_to_vc += i + ":::" + a_to_ve[i].href + "\n"; }} var a_to_vj = document.getElementById("anonyminized"); var a_to_vk = document.getElementById("found_links"); if (a_to_vj) {a_to_vj.innerHTML += a_to_vb;} if (a_to_vk) {a_to_vk.innerHTML += a_to_va;} }; function a_to_fa() {var a_to_vf = new Array(); protected_links = protected_links.replace(" ", ""); a_to_vf = protected_links.split(","); return a_to_vf; }; /*]]>*/</script> 

<script>/*<![CDATA[*/ protected_links = "javascript:;,blogger.com,paypal.me,whatsapp.com,youtube.com,telegram.me,google.com,twitter.com,pinterest.com,facebook.com,blogrtool.com";auto_safelink(); /*]]>*/</script> 

<!-- <b:if cond='data:blog.canonicalUrl == &quot;https://www.blogrtool.com/p/safelink.html&quot;'> <script>(function(s,u,z,p){s.src=u,s.setAttribute(&#39;data-zone&#39;,z),p.appendChild(s);})(document.createElement(&#39;script&#39;),&#39;https://iclickcdn.com/tag.min.js&#39;,3517783,document.body||document.documentElement)</script> </b:if> --> 

Step 2: Replace all the highlighted link with https://www.blogrtool.com/p/safelink.html with your safelink page URL.

There is an area of the code named protected_links, here you can add the domains you woud not like to pass through the safelink before access. As you add a domain, put in a comma (,). Example protected_links = "javascript:;,blogrtool.com, apkpremiumz.com, entitledknowlegde.com, football-updates.com, wearesoccerupdates.com, eductutorials.com, I have just added these domains to the protected_link distinguishing or separating them with a comma.

Step 2: Click the save icon to keep the changes you made to your template.

Now, any links you add to your site will automatically be safelinked, and visitors will have to go through your safelink page before they can use them.

Conclusion

I gave you the script for Automatic Safelink on Main Blog. Let me know what you think of the design by leaving a comment. I hope that this tool for making direct links to Google Drive from your blog will be very helpful to you. We appreciate your visit to our website.

Next Post Previous Post
No Comment
Add Comment
comment url