The topic of nofollows is incredibly interesting, we’ve heard all sorts of opinions from various industry leaders, but there’s no set tactic that has been set in stone. From my side, I feel this:
- If you have an already established website, don’t play around with your nofollows too much
- If you are starting a new site, rather work on your site architecture and juice flow, avoiding nofollows and rather using meta ignores (forget robots.txt totally)
Anyway, point here is perhaps you don’t share my opinion completely or you want a way to remove nofollows from posts on your blog, well here’s a code snippet that will sort that out for you:
function kill_nofollow($str) {
$str = str_ireplace(‘ rel=”nofollow”‘, ”, $str);
return $str;
}
add_filter(‘the_content’, ‘kill_nofollow’);
Quite a simple piece of code, basically just replaces all instances of rel=”nofollow” inside the content (the_content hook) with nothing :)
Add this to your functions.php file and all links inside posts will no longer have nofollows :)





I have no follow disabled in the comments of my blog posts because I see it as a way of giving back to my readers.
The code block is great and lets you save your time to turn all your links ‘dofollow’. Great.
But I could not understand why you are suggesting to remove nofollow for new sites and what do you mean by ‘don’t play’ for established sites? Do you think established sites should have ‘nofollow’ and starting sites should not? Why?
@Tom – Sure, the only problem you might face there is it gives readers a reason to leave rubbish comments just for a backlink, so you need to be careful about that I guess; another thing is, if you have a post which gets 40 comments all with an author who has a website, you will lose rank on that particular post..
@ictTrends – If you have an established site that is ranking, that has nofollows, I wouldn’t remove them. However, if you are starting a new website, I would rather put focus on link flow than nofollows..