How to Add Automatic Google URL Shortener on a Blogger Blog?


This service does not work.

Many of us are looking for automatic Google URL shortener “//”. When I was reading many articles and tutorials about URL shortener, I found a solution by Mr MS-Potilas. Using the Google app engine he has created a smart way to use Google URL shortener. As a base, I am taking his code and app engine and presenting a URL shortener which includes URL short by “//”, “//” and “//”. MS-Potilas URL shortener is a little different and does not include McAfee and Cligs URL shortener. It is not very tough to use this feature/script with the Blogger platform.

Default Google URL Shortener interface on // home page

Google url shortener

Google URL shortener on your Blogger blogs with two other services
Custom Google URL Shortener

Install automatic URL shortener with //

1. Blogger Dashboard › Select a blog › Switch to Template tab › Edit HTML › Expand widget templates
2. Now search for <data:post.body>
3. And now paste the following just below this or somewhere near ‘post-footer-line-3’ at right place.

Automatic URL shortener with

<script type='text/javascript'>
// Shorten Blogger post URLs using urltinyfy javascript API, by MS-potilas 2012
// Updated new shortener by Vinay Prajapati, TechPrevue Labs 2013
function loadscript(filename) {
var scr=document.createElement('script');
var waitElm=null;
function urltinyfyprompt_callback(response) {
var txt="Short URL";
if(response.title && response.title!="") txt+=' for "'+response.title+'"';
else if(response.longurl && response.longurl!="") txt+=" for "+response.longurl;
if(response.tinyurl && response.tinyurl!="")
prompt(txt+":", response.tinyurl);
alert("Could not get short URL, try again later." + ((response.error && response.error != "") ? ("nError: " + response.error) : ""));
function shortenUrl(elm, long_url, service) {
loadscript(""+service+"?unify=1&url="+encodeURIComponent(long_url) + "&callback=urltinyfyprompt_callback");
<span class='shorturls'>Short URLs:
<a expr:onclick='&quot;shortenUrl(this, &amp;#39;&quot; + data:post.url + &quot;&amp;#39;, &amp;#39;googl&amp;#39;);return false;&quot;' href='javascript:void(0)' title='Click to get short URL'></a>,
<a expr:onclick='&quot;shortenUrl(this, &amp;#39;&quot; + data:post.url + &quot;&amp;#39;, &amp;#39;mcafee&amp;#39;);return false;&quot;' href='javascript:void(0)' title='Click to get short URL'></a>,
<a expr:onclick='&quot;shortenUrl(this, &amp;#39;&quot; + data:post.url + &quot;&amp;#39;, &amp;#39;cligs&amp;#39;);return false;&quot;' href='javascript:void(0)' title='Click to get short URL'></a>
</span><span style='display:none;'><img border='0' src='data:image/gif;base64,R0lGODlhEAALAPQAAP///wAAANra2tDQ0Orq6gYGBgAAAC4uLoKCgmBgYLq6uiIiIkpKSoqKimRkZL6+viYmJgQEBE5OTubm5tjY2PT09Dg4ONzc3PLy8ra2tqCgoMrKyu7u7gAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCwAAACwAAAAAEAALAAAFLSAgjmRpnqSgCuLKAq5AEIM4zDVw03ve27ifDgfkEYe04kDIDC5zrtYKRa2WQgAh+QQJCwAAACwAAAAAEAALAAAFJGBhGAVgnqhpHIeRvsDawqns0qeN5+y967tYLyicBYE7EYkYAgAh+QQJCwAAACwAAAAAEAALAAAFNiAgjothLOOIJAkiGgxjpGKiKMkbz7SN6zIawJcDwIK9W/HISxGBzdHTuBNOmcJVCyoUlk7CEAAh+QQJCwAAACwAAAAAEAALAAAFNSAgjqQIRRFUAo3jNGIkSdHqPI8Tz3V55zuaDacDyIQ+YrBH+hWPzJFzOQQaeavWi7oqnVIhACH5BAkLAAAALAAAAAAQAAsAAAUyICCOZGme1rJY5kRRk7hI0mJSVUXJtF3iOl7tltsBZsNfUegjAY3I5sgFY55KqdX1GgIAIfkECQsAAAAsAAAAABAACwAABTcgII5kaZ4kcV2EqLJipmnZhWGXaOOitm2aXQ4g7P2Ct2ER4AMul00kj5g0Al8tADY2y6C+4FIIACH5BAkLAAAALAAAAAAQAAsAAAUvICCOZGme5ERRk6iy7qpyHCVStA3gNa/7txxwlwv2isSacYUc+l4tADQGQ1mvpBAAIfkECQsAAAAsAAAAABAACwAABS8gII5kaZ7kRFGTqLLuqnIcJVK0DeA1r/u3HHCXC/aKxJpxhRz6Xi0ANAZDWa+kEAA7AAAAAAAAAAAA'/></span><div style='clear:both'/>

4. Save the changes › Done.

How to generate // short URL?

Just click on “//” or “//” or “//” to generate respective short url for Blogger posts.,, and shortener services are not available anymore.


Url shortener is the best thing to fight with spam. It is a short and sweet way to distribute long URL over the internet especially on social media. Finally, a nice script is ready to create a short URL from “//” that was most awaited by most of us.


  1. Definitely, what a magnificent blog and informative posts, I will bookmark your site.Best Regards!

  2. will be shut down very soon…

    Now is more popular…

    Could you please also provide that???


Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.