WordPress.org

Make WordPress Core

Opened 16 months ago

Closed 5 months ago

#22876 closed defect (bug) (fixed)

Wrong robots meta output

Reported by: joostdevalk Owned by: 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 6 months ago.
Noindex follow patch

Download all attachments as: .zip

Change History (15)

comment:1 joostdevalk16 months ago

  • Description modified (diff)

comment:2 joostdevalk16 months ago

  • Description modified (diff)

comment:3 joostdevalk16 months ago

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

comment:4 follow-up: ashfame16 months ago

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

comment:5 in reply to: ↑ 4 joostdevalk16 months ago

Replying to ashfame:

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

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

comment:7 nacin16 months 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.

comment:8 joostdevalk16 months ago

This thread from Google:

http://productforums.google.com/forum/#!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:

https://twitter.com/DuaneForrester/status/278871145946701825

in reply to:

https://twitter.com/yoast/status/278867897726693377

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.

comment:9 markjaquith16 months 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.

joostdevalk6 months ago

Noindex follow patch

comment:10 joostdevalk6 months ago

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

comment:11 joostdevalk6 months ago

  • Version changed from 3.5 to trunk

comment:12 joostdevalk6 months ago

  • Keywords has-patch needs-testing added

comment:13 SergeyBiryukov6 months 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].

comment:14 wonderboymusic5 months 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.