WordPress.org

Make WordPress Core

Opened 6 years ago

Last modified 7 months ago

#11360 reopened enhancement

Don't nofollow links within the site

Reported by: caesarsgrunt Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 2.9
Component: Comments Keywords: has-patch needs-testing
Focuses: Cc:

Description

Relative links or links with the site's own domain shouldn't be nofollowed.

This use of nofollow is damaging to the site's search engine rankings.

Attachments (1)

11360.diff (576 bytes) - added by caesarsgrunt 6 years ago.

Download all attachments as: .zip

Change History (13)

comment:1 @caesarsgrunt6 years ago

See also #11359 (Don't nofollow links in admin comments)

@caesarsgrunt6 years ago

comment:2 @caesarsgrunt6 years ago

  • Keywords has-patch needs-testing added; needs-patch removed

Attached patch (didn't mean to upload it twice...) doesn't add nofollow to links within the site (eg {exapmle.com or /). It does add nofollow to links to other sites (eg google.com), including tricky sites whose domain starts with the siteurl (eg example.com.badsite.com).

comment:3 @dd326 years ago

didn't mean to upload it twice...

I just deleted 11360.2.diff to keep things straight forward :)

comment:4 @caesarsgrunt6 years ago

Thanks dd32.

I'd quite like some feedback on this patch - is there anything wrong with this approach? If not, it'd be really nice to get it into 2.9... :-)

comment:5 @caesarsgrunt6 years ago

  • Milestone changed from Unassigned to 3.0

comment:6 follow-up: @hakre6 years ago

Some feedback: How to reflect mixed usage of HTTP and HTTPS in that patch? Any Idea?

comment:7 @hakre5 years ago

  • Keywords changed from has-patch, needs-testing to has-patch needs-testing

comment:8 in reply to: ↑ 6 ; follow-up: @caesarsgrunt5 years ago

Replying to hakre:

Some feedback: How to reflect mixed usage of HTTP and HTTPS in that patch? Any Idea?

Not sure what you mean... does http/https make any difference in the patch?

comment:9 in reply to: ↑ 8 @nacin5 years ago

Replying to caesarsgrunt:

Replying to hakre:

Some feedback: How to reflect mixed usage of HTTP and HTTPS in that patch? Any Idea?

Not sure what you mean... does http/https make any difference in the patch?

The get_option() call there will only return the http:// link, not https://. There's a new function home_url() that could be used, but that still wouldn't prevent an http:// link from not being picked up on a forced SSL site and vice versa.

At the very least, using home_url() makes sense to make sure the right protocol is searched for. Checking both protocols wouldn't be a bad idea though.

comment:10 @nacin5 years ago

  • Milestone changed from 3.0 to Future Release
  • Type changed from defect (bug) to enhancement

comment:11 follow-up: @chriscct79 months ago

  • Resolution set to duplicate
  • Status changed from new to closed

This was resolved, in later commits, including #10550

comment:12 in reply to: ↑ 11 @ocean907 months ago

  • Resolution duplicate deleted
  • Status changed from closed to reopened

Replying to chriscct7:

This was resolved, in later commits, including #10550

No, it isn't. #10550 is about reply to links.

Note: See TracTickets for help on using tickets.