How To Add Nofollow to the Wordpress Comments Link

July 5th, 2008

I actually had a damn hard time finding this posted anywhere on the web, so I thought I would share.  I don't think I need to tell anyone why this is a good idea, but it is basically eliminating search engines from indexing useless links. We will use the following as an example.

Useless Links For Search Engines (possibly dup content)

http://www.lobolinks.com/blog/which-search-engine-had-the-best-4th-of-july-display/#respond

http://www.lobolinks.com/blog/entrecard-suggestions/#comments

I think you see my point.

How To Instructions

Open wp-includes/comment-template.php

Find (was around line 763 for me)

PHP:
  1. echo ' title="' . sprintf( __('Comment on %s'), $title ) . '">';

Change To

PHP:
  1. echo ' title="' . sprintf( __('Comment on %s'), $title ) . '" rel="nofollow">';

Save and Upload.  Your done.

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • del.icio.us
  • StumbleUpon
  • Sphinn
  • Mixx
  • Reddit
  • Technorati

Related Post

Posted in Blogging, Internal SEO • Tags: , , , , , , , ,