Friday , 26 April 2019

Make All External Links nofollow in Blogger Using jQuery

Make All External Links nofollow in Blogger

External links are very important in SEO (Search Engine Optimization) like sometimes we have to make it nofollow and sometimes dofollow so we have to take care of all external links but mostly we need to make all external links nofollow as we know it does not pass any PageRank juice to external sites. So if you are WordPress user then there are many plugins to make all external links nofollow automatically read my article about WP plugin which makes all external links as nofollow links and also adds target=”_blank” attribute to those links. But if you are a Blogger user then you should keep reading this article because you are just going to learn that how you can make all external links nofollow in Blogger using the most famous JavaScript library jQuery so get ready for it and keep reading it.

Make External Links nofollow in Blogger Blog

All you have to do is to add jQuery code into your Blogger blog and that’s it :) and I will tell you the most easiest way to add code so first of all go to your Blogger blog’s dashboard there go to Layout > Add a Gadget > HTML/JavaScript after selecting this widget you will see a window there in the body section paste the code which is given below and save the changes then it should work without any problem.

<script src='' type='text/javascript'></script>
<script type="text/javascript">
	jQuery(document).ready(function () {
		jQuery('a[href*="http://"]:not([href*=""])').attr('rel', 'nofollow');
		jQuery('a[href*="http://"]:not([href*=""])').attr("target", "_blank");
		jQuery('a[href*="http://"]:not([href*=""])').attr("style", "color: red;");
  • On line number 1 I have added the jQuery library (group of functions).
  • On line number 6 it changes all the external links as nofollow and see line number 8 it changes all external links to open in a new separate window.
  • And now see the line number 10 it helps to change the color of all external links to red so you can change it to any color it helps blog readers as well as blog admins to easily understand that which is external link and which is internal link.

Thanks to My Blogger Lab

Actually few days ago I was searching about this little jQuery code to make all external links nofollow automatically and I didn’t find it or maybe I wasn’t too much interested but then I saw the post and I have made a little change in the code like adding the red color to all external links. If you are facing any problem about this little jQuery plugin then simply ask me in the comments.

Leave a Reply