Benutzer: Gast
Eintrag: TypoScript: Canonical URL

TypoScript: Canonical URL

von: marcel
Kreise: Typo3

Add canonical metatag by page-id or content_from_pid (to avoid indexing double content)

Code: TypoScript (TS)
page.headerData.9998 = TEXT
page.headerData.9998 {
  typolink {
    parameter.data = TSFE:id
    returnLast = url
    forceAbsoluteUrl = 1
    #forceAbsoluteUrl.scheme = https
  }
  wrap = <link rel="canonical" href="|" />
}
[globalVar =  TSFE:page|content_from_pid > 0]
page.headerData.9998.typolink.parameter.data = TSFE:page|content_from_pid
[global]

Result

Code: XML XHTML XSLT HTML
<link rel="canonical" href="http://domain.tld/path/to/site" />
Es gibt noch keine Kommentare.