| HTML Pages | Version Control |
The dotCMS supports the addition of multiple website hosts that can all share the same templates, containers, files, and content as needed. You can create as many hosts as your server/network hardware specifications will allow. The host addresses will, of course, need to be configured/maintained in an organization's DNS records by a system administrator.
To create a new host on your dotCMS installation, simply right click on an existing host and select "New Host" from the drop down menu.

Clicking on "New Host" brings you to the "Add/Edit Host" page (see image below). On the properties tab, type the new hostname, check whether this will be the *default host (main website) for the dotCMS installation and then enter any host aliases that should also direct a user to this new host. Hosts can be permissioned based upon user roles. For more information on permissions, please see the documentation section on Host Permissions.

Hosts in dotCMS work very much like virtual hosts in apache, since you can have a single IP address but serve multiple websites depending on which hostname the client requests. During testing, you can use your hosts file (/etc/hosts on Unix like OS's, or C:\WINDOWS\system32\drivers\etc\hosts in Windows) to be able to access your virtual hosts. While you can have dotCMS listening on multiple IPs, there's no way to have a default host for each IP. So you need to have either DNS records, or during development, set up your hosts file on your local machine.
*If the server does not match the hostname or the host alias for any host on the instance in the URL, the user will automatically be re-directed to the default host.
| HTML Pages | Version Control |
Post a Comment