Important: #86577 - Query parameters are now included in canonicalized URLs¶
Canonicalized URLs include all query parameters which are needed to define what content to show on a page. These URLs are used for the canonical URL and the hreflang URLs. This is especially important with for example detail pages of records. The query parameters are crucial to show the right content.
Possibility to define query parameters to be included in canonicalized URLs¶
By default only parameters that are needed to calculate the cHash are included in the
canonicalized URLs. If you want to add your own parameters that should be included in those
URLs, you can use the newly introduced configuration option
$GLOBALS['TYPO3_CONF_VARS']['FE']['additionalCanonicalizedUrlParameters']. You can add
your own query parameters by adding them as elements of the array.
$GLOBALS['TYPO3_CONF_VARS']['FE']['additionalCanonicalizedUrlParameters'] => [ 'queryParam1', 'queryParam2', ]
This example will add query parameters
queryParam2 to the canonicalized
URLs if they are provided.
Be careful when adding your own parameters. Only add those parameters which will change the content of your page. Otherwise search engines will most likely indicate your pages as duplicate content.