Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#33705 closed defect (bug) (invalid)

Canonical URL missing with default permalink structure

Reported by: flixos90's profile flixos90 Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.4
Component: Canonical Keywords:
Focuses: Cc:

Description

I noticed that no canonical URL is shown when using the default permalink structure. This happens when you have pretty permalinks disabled, but it also happens when you enter a URL in the default permalink structure manually:
For example when I have a post where the URL is http://example.com/test-post/ and I enter http://example.com/?post=test-post or http://example.com/?post=4 (where 4 is the post ID), it shows the same post, but it does not provide a canonical URL (I assume that URL should then be http://example.com/test-post/).

Moreover, since the manually entered URL is not redirected either, I wonder if this might have consequences with duplicate content in search engines.

Change History (4)

#1 @flixos90
9 years ago

  • Keywords dev-feedback added

It seems that the %post_type% rewrite tag is not considered at all when redirecting in redirect_canonical().

Last edited 9 years ago by flixos90 (previous) (diff)

#2 @flixos90
9 years ago

Well, I just figured that I probably misunderstood the logic there. When I specify a URL parameter in the form of ?{{POST_TYPE}}={{POST_ID}}, it is not parsed at all, is that correct? I first assumed it was, due to the issue in #31781. I guess the issue here can be closed (sorry, my fault), but we should look into why the above issue is happening at all.

Last edited 9 years ago by flixos90 (previous) (diff)

#3 @flixos90
9 years ago

  • Resolution set to invalid
  • Status changed from new to closed

#4 @swissspidy
9 years ago

  • Keywords dev-feedback removed
  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.