How To Add Automatically Rel Nofollow Attribute Or Tag On All External Links Basically, using nofollow and dofollow tags tells the search engines which links you value and, in turn, which links they should give value ...
2017-12-15T08:07:51Z

How To Add Automatically Rel Nofollow Attribute Or Tag On All External Links

Basically, using nofollow and dofollow tags tells the search engines which links you value and, in turn, which links they should give value to. When used properly, nofollowing certain links helps to keep the PageRank strength for internal links.

auto rel nofollow tag all external links

Paid links, affiliate links, links within blogrolls and comments, links crediting images, etc., are all good examples of outbound external links that should be nofollowed.

Further information about it :- Google Or Wikipedia

How To Add Automatically Rel Nofollow Attribute Or Tag On All External Links


The first thing you need to do is to add an install a jQuery plugin into your blog or website. Then Go to and search for the ending </head> tag and just above it paste the following JavaScript coding.
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js' type='text/javascript'></script>
Don't add this if you are already using any jQuery.js file
<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>

Save the changes and you are done.

OR

<script type="text/javascript">
jQuery(document).ready(function () {

jQuery('a[href*="http://"]:not([href*="http://www.example.com"])').attr('rel', 'nofollow');

jQuery('a[href*="https://"]:not([href*="https://www.example.com"])').attr("target", "_blank");

    });
</script>

From the above coding, just replace www.example.com with your blog or website URL and save your template. Now this plugin would automatically add nofollow attribution as well as target="_blank" to your all external links except your own domain.

You successfully made your blog or website all external links nofollow and it saves your Pagerank and SEO juice

So this was our guide on How To Add Automatically Rel Nofollow Attribute Or Tag On All External Links , I hope the methods given above helped you.

Keywords:- How To Add Automatically Rel Nofollow Attribute, All External Links Nofollow automatically, auto rel nofollow tag all external links, Auto Nofollow attribute, add rel=nofollow tag to all outbound links automatically, How To Add Nofollow Tag To All External Links, How to Make All External Links Nofollow automatically, How To Add Automatically Rel Nofollow Attribute Or Tag On All External Links, How do I add Rel Nofollow attribute to all external links, Easy Guide.
Share it:

Blogging

How To

Post A Comment:

0 comments: