#33705 closed defect (bug) (invalid)
Canonical URL missing with default permalink structure
Reported by: | 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)
#2
@
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.
It seems that the
%post_type%
rewrite tag is not considered at all when redirecting inredirect_canonical()
.