[wp-hackers] canonical not enforced
Dion Hulse (dd32)
wordpress at dd32.id.au
Sat Mar 3 00:33:19 UTC 2012
The Canonical redirects don't kick in if it's just the homepage, this
has been done to prevent infinite loops with some configs which are
set to make the homepage with/without the www., and WordPress
attempting to redirect to the other form..
There are plugins i'm sure to redirect the home page, I have run a
custom plugin in the past to achieve it as well.
On 3 March 2012 03:42, Kevin Newman <CaptainN at unfocus.com> wrote:
> But the strange thing is that it does handle that for another situation.
> http://unfocus.com/?p=4116 does redirect to the permalink (and to
> www.unfocus.com, which is the canonical).
> Even the not shortened url will redirect if the domain is not canonical:
> It just doesn't redirect from unfoc.us based urls.
> Anyway, we'll probably hack it somewhere to do the redirect.
> On 3/2/12 11:24 AM, Nathaniel Taintor wrote:
>> "Canonical" links are a different thing from url redirection, and they're
>> not meant to be used for that. The purpose of the canonical links is to
>> inform search engine who find the pagehttp://unfoc.us/?p=4116 that it
>> should be indexed ashttp://unfocus.com/?p=4116 , and that the two URLs
>> refer to the same content.
>> WordPress's permalinks are based off of the "Site URL" option which is set
>> in "Settings> General", and since you have that option set to
>> http://unfocus.com/,<http://unfocus.com/?p=4116> you can see that even if
>> you browse to the site through the unfoc.us domain, any of the links on
>> site will resolve to unfocus.com links.
>> If you want visitors reaching the site through unfoc.us to automatically
>> redirected to the corresponding url under unfocus.com, you will have to
>> this as a rule in your .htaccess - its not something WordPress handles by
>> Hope this helps,
>> Nathaniel Taintor
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers