Make WordPress Core

Opened 11 years ago

Closed 10 years ago

#22876 closed defect (bug) (fixed)

Wrong robots meta output

Reported by: joostdevalk's profile joostdevalk Owned by: wonderboymusic's profile wonderboymusic
Milestone: 3.8 Priority: high
Severity: major Version: 3.3
Component: Template Keywords: has-patch needs-testing
Focuses: Cc:

Description (last modified by joostdevalk)

in default-filters.php, we add a new action:

if ( isset( $_GET['replytocom'] ) )
	add_action( 'wp_head', 'wp_no_robots' );

the issue is, wp_no_robots outputs noindex, nofollow. The noindex is fine, the nofollow stops any link equity from that URL, so that's actually a bad idea. Just noindex alone would be fine. Setting to priority high and severity to major as this is basically a regression.

Attachments (1)

noindex-follow.patch (417 bytes) - added by joostdevalk 10 years ago.
Noindex follow patch

Download all attachments as: .zip

Change History (15)

#1 @joostdevalk
11 years ago

  • Description modified (diff)

#2 @joostdevalk
11 years ago

  • Description modified (diff)

#3 @joostdevalk
11 years ago

And actually, rel="canonical" should fix this altogether, so there's really no need to do this at all.

#4 follow-up: @ashfame
11 years ago

+1 for adding rel="canonical" to fix this.

#5 in reply to: ↑ 4 @joostdevalk
11 years ago

Replying to ashfame:

+1 for adding rel="canonical" to fix this.

No need to add it, it's already there.

#7 @nacin
11 years ago

This isn't new to 3.5 — wp_no_robots() here went in in 3.3. Happy to make any adjustments in 3.6.

#8 @joostdevalk
11 years ago

This thread from Google:!msg/webmasters/0sqRrolO_Ss/igOdQIjwKdEJ

shows they'd prefer just a canonical, I just checked with Bing and Duane Forrester and he said the non noindex, pure canonical approach would be better for sites too:

in reply to:

So let's do that regardless of all else. I do also think we need to discuss whether the replytocom variable should really be in core anyway, as it leads to tremendous crawl actions on high comment volume blogs, without any extra value. Some logs from larger WordPress installs on how this parameter impacts crawl behavior would be helpful in that regard.

#9 @markjaquith
11 years ago

I'm convinced on removing the nofollow directive. Am unconvinced that removing noindex is a good idea. I don't want these URLs showing up in search engines, period. So I suggest we make a wp_robots_noindex() or similar function and have the replytocom URLs use that.

But based on a discussion I had with joostdevalk, I'd like to separately consider dropping these no-JS comment reply URLs altogether. You can discuss that on #22889.

10 years ago

Noindex follow patch

#10 @joostdevalk
10 years ago

Since we _did_ agree on removing the "nofollow", I've gone added a patch that changes the nofollow into "follow" globally.

#11 @joostdevalk
10 years ago

  • Version changed from 3.5 to trunk

#12 @joostdevalk
10 years ago

  • Keywords has-patch needs-testing added

#13 @SergeyBiryukov
10 years ago

  • Milestone changed from Awaiting Review to 3.8
  • Version changed from trunk to 3.3

Version number indicates when the issue was initially introduced/reported.

wp_no_robots() was added in [19304].

#14 @wonderboymusic
10 years ago

  • Owner set to wonderboymusic
  • Resolution set to fixed
  • Status changed from new to closed

In 26096:

Change nofollow to follow in wp_robots_noindex(). "The noindex is fine, the nofollow stops any link equity from that URL, so that's actually a bad idea."

Props joostdevalk.
Fixes #22876.

Note: See TracTickets for help on using tickets.