Programmatically set the front page per site?
Thanks to everyone for your responses.
I looked in to using the Domain module but am avoiding for 2 reasons:


It is still in Alpha14 and this is going to be a business critical site
I couldn't work out how to set the domain specific configurations


However, installing the Domain Module and looking at the README file pointed me in the right direction.

For anyone else who is looking to achieve setting a different Front Page per domain:


I used the Drupal Console to generate an Event Subscriber for Kernal.request
In the getSubscribedEvents method you need to set the weight to something greater than 30 which overrides the Page Cache and Dynamic Cache.

$events['kernel.request'] = ['kernel_request', '35'];

I got the editable configuration for the site settings from 

$config = \Drupal::configFactory()-&gt;getEditable('system.site');

and the site name added in sites.php by doing:

$site_path = \Drupal::service('site.path'); 
$site_path = explode('/', $site_path);
$site_name = $site_path[1];

Then added the logic:

if ($site_name === 'site2') {
  $config-&gt;set('page.front', '/node/239')-&gt;save();
}
else {
  $config-&gt;set('page.front', '/main-content')-&gt;save();
}



The Key thing I was missing was setting the Cache Context for sites.
You need to duplicate the default.services.yml from the sites/default directory and rename it to services.yml (if you don't already have this file).

Then you will need to add url.site to the required_cache_contexts array so that is becomes something similar to:

required_cache_contexts: ['languages:language_interface', 'theme', 'user.permissions', 'url.site']


Remember to flush the cache and this should work!