marcodeltongo / thematic

Automatically exported from code.google.com/p/thematic
0 stars 0 forks source link

Canonical Links #33

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Google, Yahoo, Microsoft etc. have announced a new and useful piece of 
metadata:

http://planetwordpress.planetozh.com/wordpress/

"Suppose you have read my Twitter Analytics post, and you've started 
tagging all the URL's you spread on Twitter with Google Analytics campaign 
variables. So at some point, Google enters your site through this URL:

http://yoast.com/twitter-analytics/?utm_source=twitter&utm_medium=twitter
&utm_campaign=twitter
If it did, in "old times", this would mean you'd have a duplicate content 
issue: the same content indexed under two different URL's. An issue SEO's 
have been trying to solve on web pages for ages, which sometimes created 
huge limitations. This is where the new tag comes in. You add this code to 
the <head> section of your page:

<link rel="canonical" href="http://yoast.com/twitter/analytics/"/>
And now, Google will suddenly count the links it has seen to that campaign 
tagged URL, towards the canonical URL, and not index the campaign tagged 
URL anymore. Simple, yet effective. Cool huh?

Disclaimer: this tag is only a "hint" to the search engine. While they'll 
probably use it 99% of the time, they reserve the right to handle things 
any way they want, in case of errors etc.

Of course this isn't just useful for campaign tagging. Many a webshop needs 
the URL to store sort variables, for instance. But a page that's sorted by 
price ascending, is often almost the same as a page sorted by price 
descending."

The site has a plugin available, but this is so easily done with inbuilt 
wordpress tags, I do think it should be built into themes rather than using 
the plugin.

Original issue reported on code.google.com by mur...@gmail.com on 12 Feb 2009 at 11:05

GoogleCodeExporter commented 9 years ago
I tend to agree putting the new <link rel="canonical" href="[permalink]"> 
propounded by the search engine 
giants into the header is both a good idea and  should be handled by the theme. 
AFAIK, it goes along way 
towards defusing duplicate content issue, among them those created by WP's 
paginated comments and 
paginated posts functions. This should be a rather simple modification of 
thematic_head(), I think? 

FYI, Joost de Walk's original post, referenced above, is found here: 
http://yoast.com/canonical-url-links/

Original comment by martin.k...@gmail.com on 16 Feb 2009 at 7:16

GoogleCodeExporter commented 9 years ago
Having taken a look at Joost's plugin code, I must revise my first judgement: 
obtaining a canonical URL no matter 
from where is not so trivial, However, Joost's plugin is GPL'ed, so there 
should be no objection to integrating its 
code into Thematic.

Original comment by martin.k...@gmail.com on 17 Feb 2009 at 1:43

GoogleCodeExporter commented 9 years ago
Seems as if the canonical tags will make it into the core .. Maybe we'll have a 
first
proposal 'til next week.

Cheers,

Chris

Original comment by chris.gossmann@googlemail.com on 17 Feb 2009 at 6:31

GoogleCodeExporter commented 9 years ago
Discussion on WP-Hackers is going on .. I installed the plugin today on my blog 
to
see how it behaves in a real world environment.

Original comment by chris.gossmann@googlemail.com on 18 Feb 2009 at 1:21

GoogleCodeExporter commented 9 years ago
I have installed Joost's plugin on Rheta's blog, and it seems to produce a 
consistent canonical URL no matter 
what, as far as I can judge. 

Original comment by martin.k...@gmail.com on 18 Feb 2009 at 1:57

GoogleCodeExporter commented 9 years ago
I'd like to see how this plays out in the WP community first.

Original comment by ian%them...@gtempaccount.com on 22 Feb 2009 at 11:02

GoogleCodeExporter commented 9 years ago
http://wpengineer.com/relcanonical-url-for-wordpress-theme/

Original comment by mur...@gmail.com on 24 Feb 2009 at 7:02

GoogleCodeExporter commented 9 years ago
I saw that post this morning. Is that it? Does that 1 line of code take care of 
all
the instances where a canonical URL is required? If that's it I'll make that a
filterable function in version 0.9.

Original comment by ian%them...@gtempaccount.com on 24 Feb 2009 at 9:23

GoogleCodeExporter commented 9 years ago
… unless there's already a patch for that in 2.8.

[checks]

Well if the fuss has been generated solely by the comments paging, that's fixed 
in
2.8. Anyone else have an opinion on this?

Original comment by ian%them...@gtempaccount.com on 24 Feb 2009 at 9:28

GoogleCodeExporter commented 9 years ago
Ian, comment paging is not the only situation where duplicate URLs point to the 
same content, creating a 
deuplicate content problem (although it certainly is the one that has received 
the most attention on WP lately). 
Joost de Walk imself provided analytics campaign URLs as an example in his 
original post on this – see http://yoast.com/canonical-url-links/.  Others 
certainly will crop up, if they haven’t already, hence the proposal 
to address this once and for all, independently of the content providing 
platform, through a  link in the header. 
I’m pretty creatin Google, Xahoo! and company would not have felt complled to 
propound a new standard by 
WP’s paged comment implementation :).

As to the adequacy of the aforementioned code one-liner,all I can say is 
Joost's plugin is a lot more complex, 
though some of it might be due to it trying to cater to bugs and deficiencies 
of older Wordpress versions (it’s 
bakcwards compatible at least to 1.2, judging from the comments). It also tries 
to produce useful canonical links 
for archives, paged posts and more (bascially anything but error and search 
pages), all of which the one-liner 
does not. I’m not PHP and WP savvy enough to judge the merits of his approach 
; I would however argue that 
supporting rel=canonical *as such* does make a lot more sense than rolling out 
a new fix to each duplicate 
content issue cropping up, forever and ever.

Original comment by martin.k...@gmail.com on 25 Feb 2009 at 1:20

GoogleCodeExporter commented 9 years ago
(And I hate how Google code won’t let me edit my typos :P. Or maybe I should 
just hate my sloppy proof reading 
Anyway:
* deuplicate = duplicate
* pretty creatin = pretty certain
* Xahoo! = Yahoo!
* bakcwards = backwards
Apologies)

Original comment by martin.k...@gmail.com on 25 Feb 2009 at 1:23

GoogleCodeExporter commented 9 years ago
For completeness' sake some more typos  – no, just kidding, in fact, the 
original Google post on this, somewhat 
biased towards web shops and similar (refer to Joost’s aforementioned post 
for usage cases on blogs that have 
nothing to do with WP paging):

http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html

Original comment by martin.k...@gmail.com on 25 Feb 2009 at 1:28

GoogleCodeExporter commented 9 years ago
Well, how about we add this (filtered, of course) to the head for version 0.9:

<?php if ( is_singular() ) echo '<link rel="canonical" href="' . 
get_permalink() . '"
/>'; ?>

and see how it goes.

Original comment by ian%them...@gtempaccount.com on 25 Feb 2009 at 10:39

GoogleCodeExporter commented 9 years ago

Original comment by ian%them...@gtempaccount.com on 25 Feb 2009 at 10:40

GoogleCodeExporter commented 9 years ago

Original comment by ian%them...@gtempaccount.com on 26 Feb 2009 at 3:24