#21579 closed defect (bug) (fixed)
Canonical links in paged comments should point to themselves
Reported by: | beaulebens | Owned by: | westi |
---|---|---|---|
Milestone: | 3.5 | Priority: | normal |
Severity: | normal | Version: | 3.4.1 |
Component: | Canonical | Keywords: | has-patch |
Focuses: | Cc: |
Description
Currently, the rel=canonical links inserted into posts/pages always point to the single-post/page view of that content. When comments are paged, this means
http://example.com/post/comment-page-3/
will have the rel=canonical of
That means any comments past the first page will never be indexed by compliant search engines, because they will look to the rel=canonical and thus treat all comment pages as duplicate content.
All comment pages after the first should probably use their own URL for the canonical, e.g.
Attachments (1)
Change History (9)
#5
follow-up:
↓ 6
@
12 years ago
This patch works for me, but it may be worth noting that the All-in-One SEO Pack plugin removes the action and replaces it with its own, causing me to spend a few minutes scratching my head over why the patch didn't work. Doubt that's much of a consideration, though.
#6
in reply to:
↑ 5
@
12 years ago
Replying to dllh:
This patch works for me, but it may be worth noting that the All-in-One SEO Pack plugin removes the action and replaces it with its own, causing me to spend a few minutes scratching my head over why the patch didn't work. Doubt that's much of a consideration, though.
Yeah, AIO replaces rel_canonical
with it's own implementation so this won't work on a site that has the plugin activated.
#7
@
12 years ago
- Owner set to westi
- Resolution set to fixed
- Status changed from new to closed
In [21571]:
#8
@
12 years ago
A similar (and probably more serious) problem occurs with paged singular content (i.e. that created through the <!--nextpage--> tag). See #11694 which unfortunately overloads the rel="canonical" issue with that of issuing 404s for non-existent pages. Do we need new tickets or can this one be used to fix both problems with rel="canonical" and #11694 used to fix both problems with the generation of 404s?
Attached patch makes it so that all comment pages after the first use their own URL for the canonical as per beaulebens' explanation above.