How To No-Follow All External Links In Your Blog or Website in 3 simple steps?

1 min

164 points

Let us show you how you can No-Follow all external links in your blog or website through this simple JavaScript.

Google is on a penalty spree and it is knocking down search engine rankings – serps of websites and blogs left right and center. If you are facing loss in traffic, it maybe that you have too many dofollow links which Google is considering as link sales.

Below are 3 simple steps to take care of your dofollow links and make them nofollow.

Step 1: Open your header file 
Step 2 : Copy-paste this simple JavaScript code mentioned below into your header file :

<script type=”text/javascript”>jQuery(document).ready(function () {jQuery(‘a[href*=”http://”]:not([href*=”http://www.yourwebsitename.com“])’).attr(‘rel’, ‘nofollow’);jQuery(‘a[href*=”https://”]:not([href*=”https://www.blogging.co.in“])’).attr(“target”, “_blank”);});</script>

 Step 3 : Save your File 

Voila, you have no-followed all your external links. 

You must be thinking, will this count in Google. Does Google bot read JavaScript ? Yes, technology has advanced and Google bot can now read JavaScript and understand that the links are nofollow. 

If you have any questions, feel free to ask in the comments below or just comment and tell us how the implementation went for you.

Like it? Share with your friends!

164 points
Blogging India
We help Bloggers to Build A Blog, Brand, Internet business And Make Money Online.Contact us for more information or just say Hi.
Choose A Format
Personality quiz
Series of questions that intends to reveal something about the personality
Trivia quiz
Series of questions with right and wrong answers that intends to check knowledge
Voting to make decisions or determine opinions
Formatted Text with Embeds and Visuals
The Classic Internet Listicles
The Classic Internet Countdowns
Open List
Submit your own item and vote up for the best submission
Ranked List
Upvote or downvote to decide the best list item
Upload your own images to make custom memes
Youtube and Vimeo Embeds
Soundcloud or Mixcloud Embeds
Photo or GIF
GIF format
Send this to a friend