Opened 14 years ago
Closed 8 years ago
#11360 closed enhancement (fixed)
Don't nofollow links within the site
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 4.5 | Priority: | normal |
Severity: | normal | Version: | 2.9 |
Component: | Comments | Keywords: | has-patch has-unit-tests commit |
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 (3)
Change History (19)
#2
@
14 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
).
#3
@
14 years ago
didn't mean to upload it twice...
I just deleted 11360.2.diff
to keep things straight forward :)
#4
@
14 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... :-)
#6
follow-up:
↓ 8
@
14 years ago
Some feedback: How to reflect mixed usage of HTTP and HTTPS in that patch? Any Idea?
#8
in reply to:
↑ 6
;
follow-up:
↓ 9
@
14 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?
#9
in reply to:
↑ 8
@
14 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.
#10
@
14 years ago
- Milestone changed from 3.0 to Future Release
- Type changed from defect (bug) to enhancement
#11
follow-up:
↓ 12
@
9 years ago
- Resolution set to duplicate
- Status changed from new to closed
This was resolved, in later commits, including #10550
#12
in reply to:
↑ 11
@
9 years ago
- Resolution duplicate deleted
- Status changed from closed to reopened
#13
@
8 years ago
- Keywords needs-patch added; has-patch needs-testing removed
Needs a new patch using home_url()
, perhaps even checking for https and http (using set_url_scheme()
maybe?)
#14
@
8 years ago
- Keywords has-patch has-unit-tests added; needs-patch removed
- Milestone changed from Future Release to 4.5
11360.2.diff is a refreshed patch that ensures home_url()
gets ignored, no matter if https or http is used.
Also includes unit tests for wp_rel_nofollow()
See also #11359 (Don't nofollow links in admin comments)