Pages

Thursday, November 19, 2015

How to Nofollow All External Links Automatically in Blogger

How to Nofollow All External Links Automatically in Blogger

rel="nofollow" is an attribute which helps in SEO. Unlike the Dofollow attribute which tells search bots to crawl external links, adding a rel=”nofollow” tag to external links in your site ensures that when your site is indexed by search engines, the links are not followed and associated with your site’s rankings. The search bot will not crawl the site on the other end, does not include the link text in the relevancy score for those keywords, and the link will not be counted toward the PageRank of the site that is receiving it. Follow the steps below on how to Nofollow all external links Automatically in Blogger.

Also Read: Automatically Open all External Links in a New Window On Blogger

Why Make all External Links Nofollow?

If your blog has lots of external links without a nofollow tag, search engine bots might probably prefer these external links and therefore refer targeted visitors to them, which could make your blog ranking go down. Adding a nofollow attribute to all external links does not pass the page ranking juice to these sites.

Also Read: White Hat SEO Techniques To Enhance Blog Traffic

Where To Place A Nofollow Attribute

Most search engines recommend that you put the rel="nofollow" attribute on any links that come from a source you don’t vouch for, such as:
  • comments
  • other user generated content
  • links that point to advertising
  • forums

How to Add a Nofollow Attribute Manually

  • To do this manually, include the nofollow tag in the url. For e.g if this is the external link with anchor text <a href="http: //www.informationtutorial158.blogspot.com"> informationtutorial158</a> then edit it to <a href="http: //www.informationtutorial158.blogspot.com" rel="nofollow"> informationtutorial158</a>. A nofollow attribute has been added, but manually doing this is time consuming and indeed a mind-numbing task. 

Also Read: Verified List Of High PR Dofollow Commentluv Blogs

How to Add a Nofollow Attribute Automatically

  • From your Blogger Dashboard, click on 'Template'.
  • Click on 'Edit HTML'.
  • Using ctrl+f ,  search for  </head> 
  • Copy the code below and paste 'above'  </head> 
  • Don't copy the code in red if you already have JQuery code in your template.

    <script src='http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js' type='text/javascript'></script>
    <script type='text/javascript'>
    var a = $(this);
    var href = a.attr('href');
    $(document).ready(function() {

    $("a[href^='http://']").each(function () {
    if(this.href.indexOf(location.hostname) == -1) {
    $(this).attr('target', '_blank');
    $(this).attr('title', 'Click to open in a new window');
    $(this).attr('rel', 'nofollow');
    }
    }
    );
    $("a[href^='https://']").each(function () {
    if(this.href.indexOf(location.hostname) == -1) {
    $(this).attr('target', '_blank');
    $(this).attr('title', 'Click to open in a new window');
    $(this).attr('rel', 'nofollow');
    }
    }
    );

    });

    </script>