Make WordPress Core

Opened 13 years ago

Closed 10 years ago

Last modified 3 years ago

#18547 closed defect (bug) (wontfix)

Add rel="nofollow" to reply to comments link

Reported by: pearsonified's profile pearsonified Owned by:
Milestone: Priority: normal
Severity: minor Version: 3.2.1
Component: Comments Keywords:
Focuses: Cc:

Description (last modified by ocean90)

This is an easy problem to diagnose and fix. Basically, the reply to comment links all contain a query parameter—?replytocom—in the destination URL.

Google does a poor job of "deciding" whether or not these are unique URLs, and as a result, these URLs are often indexed. This leads to duplicate content issues, which leads to users bitching :D

Here's a sample of some search results where the ?replytocom query parameter resulted in a bunch of duplicate indexing:

Google

Thanks!

Change History (16)

#2 @ocean90
13 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

It's fixed in WordPress 3.2.

If you do a search from 4th July to today there won't be any ?replytocom links indexed.

#3 @ocean90
13 years ago

  • Description modified (diff)

#4 @pearsonified
13 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

This is incorrect. The issue is NOT fixed in WordPress 3.2 (or 3.2.1).

A rel="nofollow" tag is added to the link in line 1060 of comment-template.php, but the link in line 1062 also needs to have rel="nofollow" added to it as well.

I just tested this (logged in and not logged in) on socialtriggers.com, and you can go there and see for yourself that the reply links are not nofollowed.

#5 @ocean90
13 years ago

  • Resolution set to invalid
  • Status changed from reopened to closed

It is fixed. See #16893 and r17891.

Instead of rel="nofollow" we add a meta tag, see noindex().

<meta name='robots' content='noindex,nofollow' />

#6 @pearsonified
13 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

Where is this added? I don't see those meta tags in the document <head>, and if I did, that would be an outrage, simply because comments appear on posts that should be indexed.

Why have an unbalanced solution here? If rel="nofollow" appears in line 1060 (output case #1), then it should also appear in line 1062 (output case #2).

#8 @KingdomGeek
13 years ago

  • Component changed from General to Comments
  • Severity changed from normal to minor

pearsonified is correct on this.

Line 1062 needs rel="nofollow" added, just as line 1060 does.

The lines are similar to lines 1111 & 1113, which both correctly have rel="nofollow" added.

Edited to add the following:

And yes, I see that another method has already been implemented, that of treating ?replytocom pages as non-public pages via a meta tag. At this point, Occam's Razor comes into play:

As a meta tag:

  • Robots can still visit the pages, thus resulting in an unnecessary increase in server load for sites with lots of comments (and thus lots of comment reply links)
  • An extra filter must be processed by WordPress

As a rel="nofollow":

  • No extra processing (it's just a tiny HTML attribute; no PHP logic required)
  • Robots don't load the ?replytocom pages at all

I'm not sure why a non-rel="nofollow" solution would ever be mentioned here; it solves the issue with zero overhead.

Last edited 13 years ago by KingdomGeek (previous) (diff)

#9 @ocean90
13 years ago

  • Keywords close added

Why you don't read the linked tickets?

#10550, #16881, #16709, #16893

This ticket is invalid and/or a duplicate of these.

#10 @KingdomGeek
13 years ago

I did read those. It doesn't make sense to argue so convincingly to _remove_ the nofollow attribute from the link, and then insert a meta tag to tell Google to ignore the ?replytocom pages anyway. It's unnecessary server overhead any way you look at it.

#11 follow-up: @nacin
13 years ago

  • Milestone set to Awaiting Review

Howdy guys,

I didn't agree with #10550 at the time it went in. I didn't see enough evidence that it was the right thing to do. Later, #16881 brought along more evidence and arguments. That said, we did fix this in #16893. So let's discuss where we are now.

Processing time is nada either way, so let's scratch that as an argument. Here's the evidence as I see it currently: nofollow means search engines won't crawl the links, reducing server load. But meta tags means that you won't have a penalty for having nofollow on internal links.

Two follow-ups then:

One: I'm not sure if that penalty is real.

Two: Do search engines really not follow nofollow links, or do they follow them and just decline to index them?

Thinking we should literally ask Cutts what is most appropriate for a sizable portion of the web, and implement it. Short of that, we probably should stick with the current status quo.

#12 in reply to: ↑ 11 @SergeyBiryukov
13 years ago

Replying to nacin:

Short of that, we probably should stick with the current status quo.

I guess we could commit ticket:16881:comment-template.17521.php.diff for consistency and to prevent confusion of why is rel="nofollow" in some places and not in others.

#13 @GaryJ
13 years ago

  • Cc gary@… added

#14 @chriscct7
10 years ago

  • Resolution set to wontfix
  • Status changed from reopened to closed

Per discussion.

#15 @DrewAPicture
10 years ago

  • Keywords close removed
  • Milestone Awaiting Review deleted

Sounds like the patch on #16881 is the way to go.

#16 @SergeyBiryukov
9 years ago

In 33047:

Restore rel='nofollow' for comment reply links to reduce extra crawling by search engines.

This reverts [16230], which didn't have enough review at the time of commit.

props joostdevalk.
see #22889, #18547, #16881.

Note: See TracTickets for help on using tickets.