Make WordPress Core

Opened 7 years ago

Closed 2 years ago

Last modified 2 years ago

#42835 closed defect (bug) (duplicate)

<link rel="canonical"> for paged static front-page is wrong

Reported by: chesio's profile chesio Owned by: joostdevalk's profile joostdevalk
Milestone: Priority: normal
Severity: normal Version:
Component: Canonical Keywords: needs-patch close
Focuses: Cc:

Description

Hello,

I have a website with custom paging on my static front-page. I use page slug to handle paging, because without the slug I get 404 error, but I noticed that there is no slug present in <link rel="canonical"> URL generated by WordPress.

For example: Page at http://example.com/page/2/ has <link rel="canonical" href="http://example.com/2/" />, but as said above, http://example.com/2/ serves a 404 page.

Change History (7)

#1 follow-up: @joostdevalk
7 years ago

  • Keywords needs-patch added
  • Owner set to joostdevalk
  • Status changed from new to assigned

I'm working on separating out the canonical code from Yoast SEO, which fixes this amongst many other edge cases.

In general though, if the page serves a 404, the canonical doesn't matter at all.

#2 in reply to: ↑ 1 @chesio
7 years ago

Replying to joostdevalk:

I'm working on separating out the canonical code from Yoast SEO, which fixes this amongst many other edge cases.

That's a great news, thank you! Btw. are you also aware of this edge case: https://core.trac.wordpress.org/ticket/28081#comment:27 ?

#3 @pento
6 years ago

  • Version trunk deleted

#4 @chesio
4 years ago

  • Keywords close added

I would suggest to close this ticket in favour of #49220 which has more detailed information.

#5 @JeffPaul
2 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from assigned to closed

Duplicate of #49220.

#6 @joostdevalk
2 years ago

Technically, the other is a duplicate of this 😉

#7 @JeffPaul
2 years ago

Sure, though I felt the other issue had more details to help nudge the issue along thus chosing this as the dupe :shrug:

Note: See TracTickets for help on using tickets.