Assigning a Favicon or Shortcuticon in Typo3 using Typoscript for multiple domains

Assigning a favicon is quite simple in Typo3. you can just use the following Typoscript to assign a favicon.

page.shortcutIcon = pathToFolders/favicon.ico

In case of multi-domain setup there are various ways you can achive this:

1. By adding the above code in the Typoscript Template Record of root page for each domain.

2. If same root page is used used for 2 domains we can write a conditional statement and check the domain, and change the Favicon.

[globalString = ENV:HTTP_HOST = *mydomain.com]

page.shortcutIcon = pathToFolders/favicon.ico

[global]

[globalString = ENV:HTTP_HOST = *myotherdomain.com]
page.shortcutIcon = pathToFolders/favicon2.ico

[global]