I found, for Capacitor, that there is a different way to specify the server hostname:
in capacitor.config.json add a server property:
{
"appId": "uk.co.yourid.mobileapp",
"appName": "You app name",
"webDir": "www",
"bundledWebRuntime": true,
"server": {
"hostname": "somedomain.com"
}
}