This problem was discussed here: http://drupal.org/node/48405

The problem is that when adding a comment is on a seperate page as a node, the node is submitted to the search engines twice (node/*, comment/reply/*).

I personally think that all comment pages should have a rel="nofollow" on them (replies to nodes/replies to comments).

Example:

<a href="/comment/reply/45" rel="nofollow">add comment</a>

Another fix mentioned in the previous post is to add the following to robots.txt:

user-agent: *
Disallow: /comment/
CommentFileSizeAuthor
#5 48539.patch816 bytesdopry
#1 comment_25.patch802 bytesbradlis7

Comments

bradlis7’s picture

Version: 4.6.5 » x.y.z
Component: node system » comment.module
Assigned: Unassigned » bradlis7
Status: Active » Needs review
StatusFileSize
new802 bytes

Here's a patch I came up with. See what you think.

bradlis7’s picture

Assigned: bradlis7 » Unassigned
bradlis7’s picture

An alternative would be to have a default robots.txt, and disallow all path to comments.

Zen’s picture

Version: x.y.z » 6.x-dev
Category: support » bug
dopry’s picture

StatusFileSize
new816 bytes

This is an old issue. Here is a current patch. committable or won't fix?

RobRoy’s picture

I think this might be better suited in the default robots.txt, no?

catch’s picture

Status: Needs review » Fixed

comment/reply now excluded in D6 robots.txt

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

JeremyL’s picture

Status: Closed (fixed) » Active

Is it possible to add the nofollow with a an overide in the template.php file? The robots.txt solution does not stop the leakage / dilution of pagerank from the page. The ideal solution is both the robots.txt and the nofollow.

brianV’s picture

Issue tags: +Novice

It's possible - just override the appropriate theme functions.

This could be done in core, though. That would be a novice task - add a default 'rel="nofollow"' attribute to all 'add comment' and similar links.

alexanderpas’s picture

Status: Active » Closed (duplicate)

rel="nofollow" is not a viable solution, as it still doesn't prevent the search engine to index that page, it just tells the search engine it can't take this road, and will still happilly index the page if coming from another (possibly external) page.

7.x-dev already has /comment/reply/ in robots.txt, marhing this as duplicate of #180379: Fix path matching in robots.txt