Add auto SEO links on your every blog page (SEO Smart Links for Blogger)

Hi blogger friends, Today I share a little trick to add automatic post links on every blog page. Most of the top blogs use this method to increase his site SEO.
Example: If you visit Shoutmelound.com that every article has automatic links to another article. Most of them thinks Harsh sir, spend more time to add links to every page. That is not true. Shoutmeloud is the WordPress blog. Harsh sir installed SEO Smart links plugin on his WordPress blog. This plugin has features to add automatic links to every post.
If you host blogs in blogger then don’t worry. I share some scripts to add this feature on your Blogger blog.
Add auto SEO links on your every blog page (SEO Smart Links for Blogger) 1

How to install automatic SEO links on your every blog page?

Step 1: Log In to your blogger blog.
Step 2: Next go to your blogger template >> Edit HTML.
Step 3: Copy the below code.
Note: Change highlighted text on your preferred text and links

<script type=’text/javascript’>

function smartLink(){

    this.keywdHref = new Object();

    this.add = function(keyword, href){

        if(keyword.substr(0,1) != &quot; &quot;){keyword = &quot; &quot; + keyword;}

        this.keywdHref[keyword] =  href;

    }

    this.createAnchor = function(){

        var objs = document.getElementsByTagName(&quot;div&quot;);

        for(var i=0; i&lt;objs.length; i++){

            var obj = objs[i];

            if(obj.className.indexOf(&quot;post-body&quot;)&gt;-1){

                var content = obj.innerHTML;

                for(var keyword in this.keywdHref){

                    var href = this.keywdHref[keyword];

                    var newstr = content.replace(keyword, &quot;&lt;a href=&#39;&quot;+href+&quot;&#39;&gt;&quot;+keyword+&quot;&lt;/a&gt;&quot;, &quot;gi&quot;);

                    obj.innerHTML = newstr;

                    content = newstr;

                }

            }

        }

    }

    this.startScript = function(){

        var onLoad = window.onload;

        window.onload = function(){

            if(onLoad){onLoad();}

            setTimeout(&quot;f.createAnchor()&quot;, 100);

        }

    }

}

</script>

<script type=’text/javascript’>

var f = new smartLink();

f.add(&quot;SEO&quot;, &quot;http://www.thetechwar.com/&quot;);

f.add(&quot;Tech&quot;, &quot;http://www.thetechwar.com/&quot;);

f.add(&quot;Tricks&quot;, &quot;http://www.thetechwar.com/&quot;);

f.startScript();

</script>

Step 4: Now, paste the following code on just above </body>
Step 5: Save your template.

How it Works?

In the above code, I use SEO, Tech and Tricks words. If your articles contain like this words then automatically add www.yourpreferreddomain.com hyperlink.

Add a Comment

Your email address will not be published. Required fields are marked *

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