Tuesday 30 April 2013

How to make all external links nofollow in Blogger




Hello Readers, in this article i will tell you how to make all the external links on your blogger blog nofollow using Jquery. If you are blogging for a while now you must be aware of the importance of nofollow external links. This is very useful trick for every Blogger. Applying "external no-follow" tag to all the external links on your blog will help you improve your SEO and prevent page sculpting. Too many External links on your blog may degrade the SEO as well as Google page ranks. Sometimes people just spam on your Blog with their links in the comment section or you add some social icons/widgets to your blogs that has external links, in that case this little trick will help you.
Make all External links Nofollow

Why to no-follow external links?

By adding no-follow attribute to all the external links on your blog will tell the search engines to skip those hyperlinks and the search engines like Google, Bing, Yahoo will not crawl them. It will help your blog getting better crawl rate and will prevent your Google page ranks from sculpting.

How it helps in SEO?

Well, when you mention an external link on your blog it allows the link juice to flow from your blog to the external WebPages. Too many external links will degrade your site SEO and marking them as no-follow will prevent the link juice to flow to the external WebPages. Sometimes you just forget to mark an external link no follow and you accidently allow the search engines to crawl that web page. Search engines will leave your site and start crawling those external links; it will surely affect your site SEO.

How to make all external links no-follow

I hope you get the point of making all the external links no-follow so now we should take a look at how we can do this. We will add a little Jquery code to the head section of our blog. You need to follow these simple steps:

  • First of all take backup of your blog, I recommend this before you make any change to your blog.
  • If you don't know how to take backup, check out my post about how to take backup of your Blogger blog.
  • Now that you have taken backup it is time to edit your template. Go to Template from your Blogger Dashboard.
  • Click on Edit Template and click on expand widgets.
  • Now find the <head> tag of your blog.
  • Just after this line you need to add the following code:
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js' type='text/javascript'></script>
<script type="text/javascript">
jQuery(document).ready(function () {
jQuery('a[href*="http://"]:not([href*="http://www.YOURBLOGNAME.com"])').attr('rel', 'nofollow');
jQuery('a[href*="https://"]:not([href*="https://www.YOURBLOGNAME.com"])').attr("target", "_blank");
 });
</script>
  • If you have already included Jquery in blog template, then there is no need to include it again. You can skip the first line.
  • Replace YOURBLOGNAME with your actual Blog Address and you are done.

You have just made all the external links on your blog no-follow. You can check it using Mozilla Firefox inspect element. If you allow guest posts and have some external links to the author's WebPages then you need to make some changes in the above code. Mention the links you don't want to make no=follow like you mentioned your links in the above code. If you want to make only your comments section No-follow then check out my post about how to make blogger comments no-follow.

You may also see other Blogging and SEO tips on Unziptech which can help you improve your blogging experience.

If you like my work; you can show your regards by hitting Facebook like button, following us on Google+ or Twitter, stumbling our posts on stumble upon or giving us a link back via the links below. Stay tuned for more tech updates.

Do you like this post? Please link back to this article by copying one of the codes below.

URL: HTML link code: BB link code:
author pic
Author: Mohammad Zafar Ahmad
Zafar Ahmad is PHP/Java Developer and a Passionate Blogger. He likes to write about Blogging tips, SEO tips, Blogger Widgets, Smart phones, Tablets and Online Earnings. You can find him on Facebook, Twitter or Google+

12 comments:

  1. Hello Zafar! I have a few Blogger blogs with many outgoing links, so this is a very interesting post. Unfortunately you can not see the whole code...
    I also very often link to posts in the same blog - are these also becoming no follow? I would also like to be able to link between my own blogs without these links becoming no follow - is this very complicated?

    Do you happen to know if the no follow at Blogger is working? When I make links I mark them as no follow, but if I'm checking the link a while after my mark at no follow is gone.

    Thanks a lot
    Best wishes

    ReplyDelete
    Replies
    1. Yes blogger supports no-follow tags. If you mark a link no-follow it will remain no-follow untill you change it. You can easily check the no-follow flag by using Mozilla firefox's inspect element. Just right-click on any link you marked no-follow and click on inspect element, make sure you use mozilla firefox to make this option appear on right-click..it will show you the code with no-follow flag..

      Delete
  2. How to make all posts in Blogger nofollow and gadget be dofollow

    ReplyDelete
  3. Thank you so much for this! Question, is there a way to manually make a link dofollow, for example, if I have a guest post, etc.., without changing the entire code?

    ReplyDelete
    Replies
    1. Well this Jquery script will make all external links no-follow..if you want to make a link do-follow you need to mention another Jquery/Javascript code for that particular post to remove no-follow flag..

      Delete
  4. Hi Zafar,
    Will this also work if I put it in my head tag of my internet site?

    It would be a good quick way to make all my links no follow in the one hit and ensure I did not miss any while building it.

    ReplyDelete
    Replies
    1. Hey Dickie, Yes are right..you need to put it in the Head tag of your blog/site..

      Delete
  5. Hello Zafar Brother
    Nice Sharing brother..
    It's Really help me thanks for that
    Regards
    RiZwan

    ReplyDelete
  6. Thanks for this great tutorial, I just implemented it on my site.

    ReplyDelete
  7. @rizwan
    @Will
    Thanks both of you..yeah its a good way to prevent spam comments.. :)

    ReplyDelete
  8. @Zafar: Dude This is Really Awesome... but There's a Small problem it made all pics on my blog no-follow and my blog is based on images only. what should i do to do-follow all images

    ReplyDelete
    Replies
    1. @admin
      Well this tut is about making the hyperlinks no follow, i wonder if it affects the images..

      Delete