Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pagination not applied to custom canonical URLs #948

Closed
wpsmort opened this issue Jul 5, 2017 · 2 comments

Comments

Projects
None yet
4 participants
@wpsmort
Copy link
Member

commented Jul 5, 2017

Reported here - https://wordpress.org/support/topic/wrong-canonical-url-at-certain-paginations-pages/

If you have Enable Custom Canonical URLs checked and set a custom canonical URL for a post with paginated content, the custom canonical URL appears without the page number on the end.

For example:

First page - link rel="canonical" href="http://aioseop.dev/my-custom-canonical-url/"
Second page - link rel="canonical" href="http://aioseop.dev/my-custom-canonical-url/"
Third page - link rel="canonical" href="http://aioseop.dev/my-custom-canonical-url/"

The correct URLs for second and third pages should be:

Second page - link rel="canonical" href="http://aioseop.dev/my-custom-canonical-url/2/"
Third page - link rel="canonical" href="http://aioseop.dev/my-custom-canonical-url/3/"

@wpsmort wpsmort added the Bug label Jul 5, 2017

@hadingrh

This comment has been minimized.

Copy link

commented Jul 6, 2017

Thanks to report here @wpsmort

It's a serious issue for a web using custom canonicals. Because I experienced a drop rankings for some targeting articles, that other URL used canonical pointed to those articles.

I update the issue here, since I was blocked to login to wordpress.org by jetpack (don't know why, I didn't spamming or did anything wrong since I asked a question in support forum).

Seems that the plugin use a wrong canonical, if the the first position on a certain page having a custom canonical. It will not happened if the article that having a custom canonical is other than at the first position (e.g at second, third, fourth, so on).
I'll give you a live example, please have a look at this page https://www.richamorindonesia.com/page/19/.

The https://www.richamorindonesia.com/masker/ has a custom canonical to https://www.richamorindonesia.com/cara-memutihkan-kulit-secara-alami-dan-aman/
At the page 19 (https://www.richamorindonesia.com/page/19/), where the article archieved (that is at the first position), the page is canonicalized to link rel="canonical" href="https://www.richamorindonesia.com/cara-memutihkan-kulit-secara-alami-dan-aman/", not to link rel="canonical" href="https://www.richamorindonesia.com/page/19/"

I hope this info can make event clear of the issue.

@michaeltorbert michaeltorbert added this to the 2.3.15 milestone Jul 6, 2017

@wpsmort wpsmort modified the milestones: 2.3.15, 2.3.16 Aug 3, 2017

@wpsmort wpsmort modified the milestones: 2.3.16, 2.3.17 Aug 17, 2017

@wpsmort wpsmort modified the milestones: 2.3.17, 2.5 Sep 5, 2017

contactashish13 added a commit to contactashish13/all-in-one-seo-pack that referenced this issue Jan 13, 2018

@contactashish13

This comment has been minimized.

Copy link
Contributor

commented Jan 13, 2018

contactashish13 added a commit to contactashish13/all-in-one-seo-pack that referenced this issue Jan 26, 2018

contactashish13 added a commit to contactashish13/all-in-one-seo-pack that referenced this issue Jan 26, 2018

contactashish13 added a commit to contactashish13/all-in-one-seo-pack that referenced this issue Feb 26, 2018

contactashish13 added a commit to contactashish13/all-in-one-seo-pack that referenced this issue Mar 17, 2018

@michaeltorbert michaeltorbert modified the milestones: 2.5, 2.6 Mar 22, 2018

@wpsmort wpsmort removed their assignment May 15, 2018

@wpsmort wpsmort removed the Merge Conflict label May 15, 2018

@wpsmort wpsmort modified the milestones: 2.6, Future Release May 15, 2018

@wpsmort wpsmort self-assigned this May 15, 2018

contactashish13 added a commit to contactashish13/all-in-one-seo-pack that referenced this issue Jul 27, 2018

@michaeltorbert michaeltorbert modified the milestones: Future Release, 2.9 Oct 9, 2018

contactashish13 added a commit to contactashish13/all-in-one-seo-pack that referenced this issue Oct 10, 2018

contactashish13 added a commit to contactashish13/all-in-one-seo-pack that referenced this issue Oct 11, 2018

michaeltorbert added a commit to contactashish13/all-in-one-seo-pack that referenced this issue Oct 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.