Make WordPress Comments DoFollow
In WordPress the links on any comment made on posts have the HTML attribute of NoFollow by default. What this simply means is that it tells the search engines that a hyperlink will just ignore or not influence the target’s ranking in the search engine’s indexing. If you are not familiar with it, the attribute should look like this within the tag if you look at the source:
<a href='http://link_of_site_here' rel='external nofollow' class='url'>
The highlighted part of the <a> tag is how WordPress writes the link. If you want to change this to something else, like the ever popular DoFollow attribute, there are 2 ways of achieving this.
1) Hacking Your Wordpress – The first method is to “hack” the source code of your WordPress blog. It is very easy and doesn’t involve any programming know-how. All you need to do is to find and edit the file named comment-template.php. This should be easily found under the wp-includes directory of your WordPress installation.
Once you’ve found this file, open it with your favorite editor then go to the function named get_comment_author_link() as seen below:
function get_comment_author_link() {
$url = get_comment_author_url();
$author = get_comment_author();
if ( empty( $url ) || 'http://' == $url )
$return = $author;
else
$return = "<a href='$url' rel='external nofollow' class='url'>$author</a>";
return apply_filters('get_comment_author_link', $return);
}
Again take note of the highlighted part on the code above. That is the part that you should edit. There is actually no DoFollow attribute. Instead taking out the nofollow from the code is all you need to do. After you’ve done the necessary changes, the result should look like this:
$return = "<a href='$url' rel='external' class='url'>$author</a>";
Save the file, upload it to your host server and you’re good to go! Do note that this will only take out the nofollow attribute on the “author link” part of the comment. Links on the body of the comment will stay the same – NoFollow. But that is good since we do hate links dropped on the comment body don’t we? It looks too spammy. Most of the time this kind of comment goes directly to the spam bin. If you want to make all links made on the comment DoFollow, you’ll have to do more hacking. However, I don’t recommend this method of making comments on your blog DoFollow. Directly altering WordPress code is something you should avoid doing since this breaks on version upgrades.
By the way, External, in case you were wondering is an attribute that tells your browser to open the link in another page or tab. It is the valid XHTML strict equivalent to target=’_blank’, which is not supported. This, however, needs javascript to function properly.
2) Plugins – The 2nd method, and what I recommend, is to install a WordPress plugin to take care of making links on comments DoFollow. There are several plugins available at the WordPress plugins page. Or you can search for it directly from the control panel. Keyword for the search? Dofollow of course! I will leave it up to you to decide which plugin best suits your taste
How does a DoFollow link benefit you? Well for one you should be getting more comments from people who are trying to build backlinks to their site. (More traffic perhaps?) I see this as a 2-way benefit too. You comment on my site, I follow. I do the same on your site. Well if you’re not a believer of DoFollow, at least approve our comment. LOL!
Anyway, DoFollow encourages commenting on your posts but be warned that spammers love DoFollow blogs a lot. Once you have enabled this, expect to see more spam comments on your site. Of course you wouldn’t be running a blog without some form of spam protection, would you?
You can leave a response, or trackback from your own site.

Follow Us On Twitter
Make WordPress Comments DoFollow | Write Effects…
In WordPress the links on any comment made on posts have the HTML attribute of NoFollow by default. What this simply means is that it tells the search engines…
Really valueable information for all webmasters. Also didn’t know the attribute ‘external’.
Thanks!
I’m always looking for more information about this, thanks for the awesome post, keep them coming!
You have great blog and this post is good!
–
Can you automate this process by using some sort of wordpress plugin?
Thank in advance…
No. 2 suggests the use of Plugins to make it easier. =D So yeah that’s some sort of automation already.
did as presecibed above no luck!
“How does a DoFollow link benefit you? Well for one you should be getting more comments from people who are trying to build backlinks to their site. (More traffic perhaps?) I see this as a 2-way benefit too. You comment on my site, I follow. I do the same on your site. Well if you’re not a believer of DoFollow, at least approve our comment. LOL!”
Amen to that ;p
Good info, always gotta comeback to the well that keeps giving!