If you’re a blogger (or a blog reader), you’re painfully familiar with people who try to raise their own websites’ search engine rankings by submitting linked blog comments like “Visit my discount pharmaceuticals site.” This is called comment spam, we don’t like it either, and we’ve been testing a new tag that blocks it. From now on, when Google sees the attribute (rel=”nofollow”) on hyperlinks, those links won’t get any credit when we rank websites in our search results. This isn’t a negative vote for the site where the comment was posted; it’s just a way to make sure that spammers get no benefit from abusing public areas like blog comments, trackbacks, and referrer lists.

Let’s take a look

Locate the edit-link-form.php stored in your wp-admin folder. Download it and open it in a text editor. Locate the following code: <th scope=”row”> <?php _e(’friendship’) ?> </th>, under this code you will see <td></td> tags, roughly on line 123 or so. See the image below. Where you see the pink rectangle, you will be adding the following code:

<label for=”nofollow”>
<input class=”valinp” type=”radio” name=”friendship” value=”nofollow” id=”nofollow” <?php xfn_check(’friendship’, ‘nofollow’, ‘radio’); ?> /> <?php _e(’nofollow’) ?>
</label>

Once you have added the new lines of code to the edit-link-form.php file, save it and upload it replacing the old file.

Navigate yourself to your Blogroll in your WP-Admin section of Wordpress. The next step is to either Add a new link or Edit a current link, you can do this by clicking Edit next to the blog you choose, see the image below:

Once you are in the edit settings of the blog, you will notice menu entitled ‘Link Relationship (XFN), if you click on the header, it will expand the menu. Under this menu you will see a ‘nofollow’ radio button under the ‘Friendship’ sub heading. Select this option and click the Save Changes button. See Below:

That’s it, you’re done. This will automatically add the nofollow attribute to the blog in your blog roll. To double check, refresh your website and view the websites source code. You will see rel=”nofollow” in the links <a href=”"> tag.

Lovely little tip to keep your Page Rank up to standards :)