How to add nofollow to wordpress blogroll links
So I recently discovered that my site had dropped for PageRank 5 to a PageRank 3. I looked into it, and I still have lots of links coming to my site. It appears that I was penalized by Google, and it seems to be because I had some paid links on my homepage. So, I decided to add rel="nofollow" to the links. The only problem is that when you try to do this with the Blogroll editor in WordPress, there is no nofollow option. So I had to add one.
If you wish to do the same, it's quite easy. Just find the /wp-admin/edit-link-form.php file, create a backup copy of it, and modify it. Look for lines 113 and 114, which should look like:
And add this code before it:
You'll now be able to edit your blogroll links and add rel="nofollow" to any you wish.

on December 19th, 2007 at 10:39 pm
Dude, thanks! You are a genious..:)
on January 8th, 2008 at 6:29 pm
What more can I say? It works - unlike other hacks - straight out of the box. Now I can rest easy at night! Thanks.
on January 14th, 2008 at 3:39 am
Doesn't seem to work for me…I get an error on the page saying there exists an extra { in line 1 … some stuff like that even after checking several times…
on January 24th, 2008 at 9:36 pm
Thank you for this.
on January 25th, 2008 at 8:09 am
I was looking for that for quite a long time, Thanks !
on January 27th, 2008 at 5:51 am
Is having any plugin available to add no follow in blogroll without touching Wp Core files ???
on February 1st, 2008 at 3:47 am
Works perfect, thanks!
on February 3rd, 2008 at 9:05 pm
Hi Justin,
looks like the big G still isn't happy with you, you've got PR0 now…
just got the same for one of my blogs in the recent update, and I'm guessing it's because I've got blogroll links to other sites of mine that aren't "nofollow"'d..
thanks for the code, gonna go try it out now..

Mattg
on February 19th, 2008 at 12:31 pm
Thanks! This is exactly what I was looking for.. Do you know if edit-link-form.php gets overwritten when installing new versions of Wordpress?
on March 4th, 2008 at 5:19 pm
Senthil I wrote a plugin for this, get it here wordpress blogroll nofollow.
on March 6th, 2008 at 6:24 pm
Thanks … this is one hack that worth it's weight in Gold … Great contribution …
Edward
on March 17th, 2008 at 8:13 am
Is it a must to add no follow to blogrolls for Google?
on April 30th, 2008 at 11:22 am
Hey man, thanks for the code.
Just to update, I'm using 2.5.1
the lines that need to be edited is now on 165 to 166.
Simon, yes, preferably, lower your PR, slower your pages get indexed, you want to absorb all of the PR as much as possible.
on May 2nd, 2008 at 5:00 am
Thanks for the lucid explanation
on July 2nd, 2008 at 8:07 pm
Thanks for sharing. Been looking for something like this for my blog. Need to put it up.
on October 29th, 2008 at 9:07 am
Absolutely brilliant!
on November 3rd, 2008 at 9:11 pm
This is exactly what I've been looking for so long time. I was unable to add "nofollow" relationship to a blogroll link, till now. Thanks for this.