Make WordPress Core

Opened 11 years ago

Last modified 5 years ago

#22879 new defect (bug)

Canonical Link Missing on Front Page

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

Description

Canonical links are provided for posts, so if someone links to /2012/12/my-post/?whatever then Google will know it is a duplicate of /2012/12/my-post/

But if someone links to /?whatever there is no canonical address.

Attachments (1)

22879.diff (1.2 KB) - added by iworks 8 years ago.

Download all attachments as: .zip

Change History (8)

#1 follow-up: @miqrogroove
11 years ago

This is also a problem with the default search path, /?s= where WordPress uses the wrong template and displays the front page instead of the search results page.

Last edited 11 years ago by miqrogroove (previous) (diff)

#2 in reply to: ↑ 1 @ocean90
11 years ago

Replying to miqrogroove:

This is also a problem with the default search path, /?s= where WordPress uses the wrong template and displays the front page instead of the search results page.

#11330

#3 @onetarek
11 years ago

Related to Ticket #23060

#4 @chriscct7
9 years ago

  • Keywords needs-patch added

#5 follow-up: @NickDuncan
8 years ago

I have tested this on 4.4-alpha-33636-src with post name permalinks and even if you use
/post-1/?variable=anything
the canonical link still points to the parent URL of
/post-1/

#6 in reply to: ↑ 5 @SergeyBiryukov
8 years ago

@NickDuncan: Thanks for testing, but it looks like the ticket is about missing canonical link on front page, not on a post.

On the other hand, the current implementation was specifically introduced for singular pages, see [11777].

#7 @iworks
8 years ago

Patch contains:

  • canonical for home/front_page
  • canonical for search result

I'm not sure we should add canonical url for taxonomies. If yes, give me a sing and I add this.

@iworks
8 years ago

Note: See TracTickets for help on using tickets.