Feature #20051

Support the "canonical" tag

Added by Michael Stucki about 8 years ago. Updated 10 months ago.

Status:Accepted Start date:2009-02-19
Priority:Must have Due date:
Assigned To:Benni Mack % Done:


Category:Frontend Spent time: -
Target version:8 LTS
PHP Version:5.5 Complexity:
Tags: Sprint Focus:


TYPO3 should provide built-in support for the "canoncial" tag which was recently introduced by various search engine providers (see links below).

See these URLs:
(issue imported from #M10486)


#1 Updated by Dennis Geldmacher about 8 years ago

There is a way by adding it with TS. Perhaps you could test it along some instalations. I think it works great this way. What do you think?

lib.meta.canonical = COA
lib.meta.canonical {
10 < config.baseUrl
10 {
wrap = |/
20 = TEXT
20 {
typolink {
parameter.data = TSFE:id
returnLast = url
wrap = <link rel="canonical" href="|"/>
required = 1

#2 Updated by Michael Stucki about 8 years ago

I did not try but tend to say that this is a wrong attempt.

The canonical URL of every page output type must be the same (print-page, PDF output, RSS feed, HTML, etc.) - as far as I see this is not considered by the above attempt.

However, it could be even more advanced. Say you have a table that lists records, and you can sort it in different ways, then also these pages should all have the same canonical URL.

#3 Updated by Dennis Geldmacher about 8 years ago

Ok, good points. Didn't thought of the more complex scenarios.

I'm sure that you can tweak it more with TS so it fits the special needs of each specific site. But out of the box this would be a nice feature.

I think the best solution would be to let you define the parameters that are allowed to change or generate this URL.

.allowedParams = id,tt_news[cat],L

Actually i don't know how to make this possible but perhaps someone else. ^^

#5 Updated by Dennis Geldmacher almost 8 years ago

I found a really good snippet at http://blog.marit.ag/2009/02/23/canonical-tag-fur-die-suchmaschinen/

What do you think of this approach? I think this is the more advanced version of my previous snippet.

#6 Updated by Steffen Müller almost 8 years ago


A table with top 100 movies has a different meaning than a table with worst 100 movies. Although it is the same data (movies + rating) just sorted in a opposite order, I'd say this is two different aspects which should be expressed with two URIs.

What's the matter? We should keep in mind to leave this decision to the admin and give him the power of configuration.

#7 Updated by Mathias Schreiber about 2 years ago

  • Description updated (diff)
  • Category deleted (Communication)
  • Status changed from New to Accepted
  • Assigned To set to Benni Mack
  • Target version changed from 0 to 7.0
  • PHP Version changed from 4.3 to 5.5

Should be part of the whole "seo_basics get's standard" thing.

#8 Updated by Mathias Schreiber about 2 years ago

  • Target version changed from 7.0 to 7.1 (Cleanup)

#9 Updated by Benni Mack over 1 year ago

  • Target version changed from 7.1 (Cleanup) to 7.4 (Backend)

#10 Updated by Susanne Moog over 1 year ago

  • Target version changed from 7.4 (Backend) to 7.5

#11 Updated by Benni Mack over 1 year ago

  • Target version changed from 7.5 to 8 LTS

#12 Updated by Riccardo De Contardi 10 months ago

  • Category set to Frontend

Also available in: Atom PDF