DISQUS

The Marketing Technology Blog: Hacking WordPress: Removing Nofollow from the Source

  • William Tully · 2 years ago
    Love it! Thanks fuzzy-faced WordPress hacker!

    (would be nice if they just coded it in as an option to turn on/off from the options panel)
  • Douglas Karr · 2 years ago
    Within one of the WordPress forum, that was a common thread, William!
  • Dotty · 2 years ago
    Thank you for this post. I have been going nuts trying to find where to remove the nofollow. You are a wonderful resource.

    Dotty
  • Douglas Karr · 2 years ago
    Thanks Dotty! I can read comments like that all day!
  • property investor · 2 years ago
    Thanks Douglas. I installed the dofollow plugin, but then removed it again as it was not quite working correctly.
    I did a google search and then found your blog. I'll try out the WP hack later. Hopefully it will get more people commenting on my blog.
  • Douglas Karr · 2 years ago
    Hi P.I.,

    I noticed the same thing and that's why I made this change! I do think it supports more folks commenting!

    Regards,
    Doug
  • Jeff Houdyschell · 2 years ago
    Thanks Doug, I am going right from here to all my blogs and doing a little hacking.

    May even do a short post on my site and refer them here...

    Jeff,
    WordPress Guides
  • Groovy Mom · 2 years ago
    Gosh, this is such an easy fix, I keep reading it thinking I'm not getting something.

    I installed LinkLove yesterday to remove the nofollows. This is a (simpler) no-frills approach. I'll have to keep it bookmarked, just in case. Thank you!!
  • Clarissa · 2 years ago
    Thanks, I changed it too. Much appreciated.
  • Jerome Baum · 1 year ago
    This is great.

    I wish I could make the same change, but my blog is hosted on WordPress.com (see it here), so unfortunately I cannot edit anything (even editing just the CSS costs money, not to talk about editing themes).

    Might go for another host, then I will definitely follow your lead on this!

    Jerome
  • Ryan McCue · 1 year ago
    I just thought I'd mention, the second part should be possible without commenting it out. You should be able to use the following: remove_filter('pre_comment_content','wp_rel_nofollow'):
    Stick that in your template or in a plugin :)
  • Misha · 1 year ago
    Wow!

    That's a nice hack! Now I can do this without plugin :D Thanks, Douglas :)

    Misha
    Mapquest
  • Mari Adkins · 1 year ago
    Thanks for this. I've been reading a lot of people who are doing this lately - but you're the first person who's told me how. ;) I followed along, modded my files, and am saving this for when I do upgrades so I have it. ;)
  • Kurt · 1 year ago
    Found on line 154 in Wordpress 2.5 - Great Hack
  • Douglas Karr · 1 year ago
    Thanks, Kurt! I've updated this post for WordPress 2.5.
  • Michael · 1 year ago
    Me and a friend were just talking yesterday about getting rid of the nofollow and we thought that it was just something that we would have to live with.

    Then today he sends me this great post!!

    I will be making this change immediately. I only hope every blogger out there reads this post

    thanks
    michael
  • Dorothy · 1 year ago
    I just upgraded my Wordpress Blog - noticed I needed to "rehack" my site. Thanks for having these instructions here. They helped me once again
    Dotty
  • thatsme · 1 year ago
    Half the fun of posting comments is so that all involved to get a link back to your own website. Thanks for letting others get this benefit.
  • Giovanni · 1 year ago
    Making the change:

    //add_filter('pre_comment_content', 'wp_rel_nofollow', 15);

    The old comments continues with nofollow ...

    How can I to remove this?
  • Gunawan · 1 year ago
    Thank's you for your information.
  • Flash design · 1 year ago
    I'm really confused on this area. I do think that the nofollow is not the right way to do it and it ruins it for a lot of other people. However many blogs I used to read got spammed so badly.
    Hmmm strange my first comment didn't get posted. How come ?
  • Lutfi · 1 year ago
    I am a do-follow member too, but i have a doubt. Is it have a bad effect for our PAGERANK?
  • Douglas Karr · 1 year ago
    Hi Lufti,

    If you do not moderate comments and allow link spam into your sites... YES... you can definitely damage your Pagerank. I would not recommend it without moderating comments carefully.

    Cheers,
    Doug
  • Jennifer Bogart · 1 year ago
    Awesome! Thank you! I am a fairly new blogger, and was trying to find this in the code myself, but failed :). So I installed Dofollow, but then, after it was correctly activated etc. the no follow code was still showing up in the comment html when people tried to leave links in their comments! ARGH! Thank you SO much! I just edited my code and am off to uninstall Do Follow now. Found you through a Google search.
  • MikeV · 1 year ago
    Did the mods but is there a way to remove nofollow from existing comments?

    Thanks-
  • Luis Narvaez · 1 year ago
    Thanks Douglas for this nice tip I think do follow is the way to go, and about Page Rank issues there are many PR6 do follow blogs around so personally I don't think well moderated comments spoil Page Rank.
  • Blog Bloke · 1 year ago
    Done! Thanks Doug
  • Blog Bloke · 1 year ago
    By the way Doug, what do you think about this article:

    http://mixedmarketarts.com/2008/02/12/top-9-rea...

    Do you believe removing "nofollow" leeches our pagerank? I would be interested in your opinion on that.

    ...BB
  • Douglas Karr · 1 year ago
    I honestly don't believe a single point he's made, Bloke. Since I moderate my comments and verify the source, I do a good job of keeping the spammers out and having great conversations with my readers. They deserve credit for those conversations!

    I think you're similar to me, we don't just write on our blog, we like to engage! That means we pay attention to the comments - not simply letting them run amuck.
  • Blog Bloke · 1 year ago
    It's something that I've often pondered myself.

    Will "dofollow" blog comments linking to irrelevant or poorly ranked blogs end up hurting our pagerank?

    Hmm, I hope not. I'm really not sure myself and there doesn't seem to be a lot of discussion out there about it.

    Only time will tell I suppose. Let me know if you find any more information will you please?

    Thanks Doug.
  • Douglas Karr · 1 year ago
    Hi Bloke,

    I found this in-depth article over at SEOMoz:

    Search engines cannot afford to remove all pages that are linked to by spam pages for precisely this reason - intelligent spammers point their links to themselves, their competition and their community. It would take significant effort to reveal which pages are spam and which are natural, which is exactly the point of these more modern, sophisticated artificial link schemes.


    Doug
  • Blog Bloke · 1 year ago
    So I guess those SEO types who tell us to only link to quality and relevant links are talking through their hats (white or black). :-)
  • Blog Bloke · 1 year ago
    By the way, I would like to invite you to write a guest post @ Blog Bloke dot com. Let me know and I will send you an invite login.

    Cheers,

    ...BB
  • Work At Home Mom Tara · 1 year ago
    Thank you so much for this help. I have been trying to find the code that was hidden in! After reading this it took me 3 minutes!
  • Janrafi · 10 months ago
    how come i still can't remove the rel="nofollow" in the comments area? i already put the // in the 2nd part where you advised.
  • Douglas Karr · 10 months ago
    You'll also need to check your comments page in your template, Janrafi.