• Homepage

    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] echo ‘ title=”‘ . sprintf( __(‘Comment on %s’), $title ) . ‘”>’;[/php]

    Change To

    [php] echo ‘ title=”‘ . sprintf( __(‘Comment on %s’), $title ) . ‘” rel=”nofollow”>’;[/php]

    Save and Upload.? You’re done.

    Related Post

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