Configuration: Multi Domain Setup

Thomas B edited this page Apr 6, 2016 · 1 revision

Configure one Roundcube installation to serve multiple domains

In case you have one installation of Roundcube to serve multiple domains hosted on one server you can create host-specific config files. These files have to be named like <hostname>.inc.php and are saved in Roundcube's config directory.

Roundcube does not read them by default so you need to set the 'include_host_config' option to true in the main config file.

If enabled, Roundcube will additionally load the file that matches the host name used to access Roundcube and merged the options configured there over the main config file. This means that they only need to contain the parameters that differ from the main configuration. Most common configurations on host-specific files are these:


$config['default_host'] = '<imap-host-for-this-domain>';
$config['username_domain'] = '<the-domain-name>';

Setting 'username_domain' will make Roundcube append the correct domain part if a user only logs in with its user name (e.g. user instead of

Host-name mapping

Instead of setting 'include_host_config' simply to true, you can specify a hash array assigning host names (key) to config file names (values) like the following example

$config['include_host_config'] = array(
    '' => '',
    '' => '',
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.