Finding Dofollow Links
Before correcting them, we have to find them! I use the awesome SearchStatus Firefox add-on to hunt down any unintentional dofollow links. After installing the plugin, I just enable the “Highlight Nofollow Links” feature by right clicking on the @ symbol on the bottom right of Firefox.
After enabling the “Highlight Nofollow Links” feature, you will see that all nofollow links will be highlighted red.
Nofollow Using jQuery Magic
The beautiful thing about jQuery is its ability to perform operations on multiple things with a single line of code. I can abuse this feature to help me set all links in any HTML block with a rel=”nofollow”. Just to give you an idea of how easy and powerful this is, this is the line I use to nofollow all links in my Intense Debate comment form:
$(".comment_form a").attr("rel", "nofollow");
To dofollow a certain set of links, you can do something like the following:
$(".blogroll a").attr("rel", "");
Easy isn’t it? No plugin hacking, no search and replace, and no hassle!
(For those of you who are not the jQuery type, you can take a look at the jQuery selector documentation to figure out the meaning of “.comment_form a”.)
In this section, I will show you how to get jQuery code to run on every page load.
- Download nofollow.js and place it anywhere on your server as a base to start from.
- Modify nofollow.js using jQuery to follow/nofollow any links as you see fit.
- Refer to nofollow.js in the footer of your template. For example:
After realizing the power of jQuery and this Googlebot feature, patching leaking PR link juice isn’t that bad after all.