A single dotCMS instance may manage multiple different web sites. Each “site” is actually a separate website, but all sites are managed and the content for all sites is served from a single dotCMS instance. A single dotCMS server can manage literally hundreds of sites.
For information on specific actions, please select the appropriate section:
- The Host Content Type
- Distinguishing Among Multiple Sites
- The Default Site
- Managing Sites
- The System Host
The Host Content Type
All sites are instances of the Host Content Type. This Content Type can be edited from the Content Types tab, and you can add new fields to this Content Type to customize site properties. These fields can be dynamically pulled on front end pages as needed. For more information on adding fields to a site, please see the Adding Sites documentation.
Distinguishing Among Multiple Sites
On the front end, sites are distinguished by the domain name used to access the site. Each website is accessed from a different domain, but each domain is mapped (via DNS) to the IP address of the same dotCMS server. When dotCMS receives a request, it automatically serves the content from the site mapped to the domain from which the request was received.
On the back end, the dotCMS user interface allows you to select which site to manage and display content for. The Change Site menu is displayed on the top right of each page which lists Content that may be displayed for different sites. To display the content for a different site, select the new site from the menu. Note that you may select a new site from the menu or search for a site by name; to search for a site by name, type the first three letters of the Site into the popup, and then select from the displayed list of matching sites.
The Default Site
You must specify one of your sites as the default site. This is the site that's displayed when dotCMS cannot match the domain name used to access a page with the domains (or Alternates) of any of your dotCMS sites. This happens, for example, when you access the dotCMS server using “localhost” or by directly typing in the IP address of the dotCMS server (instead of a domain name).
To manage Sites, select Sites from the System menu.
A list of Site Names and Aliases are displayed. To filter the list of sites, type text into the keyword search box, and only those Sites whose Host Name or Alias matches part of the typed string will be displayed.
To edit a site, left-click the title of the site in the list.
To perform other actions on the Site, right-click the title of the site in the list, and a menu displays the following:
|Action||Description||Displays When Site is|
|Edit||Edit and view site properties||Not Archived|
|Edit Site variables||Add site variables to the selected host only||Not Archived|
|Stop Site||De-activate the site, so it is no longer public. (Note that a site must be Stopped before it can be archived or deleted). Note: This option only displays if the site is active.||Active|
|Start Site||If the site is not active, activate the site, making it public.||Not active and Not Archived|
|Archive Site||Archive the Site.||Not active and Not Archived|
|Unarchive Site||Unarchive the Site.||Archived|
|Delete Site||Delete Site. Warning: This action can NOT be undone; all contents of the site will be deleted and may not be retrieved.||Archived|
|Make default||Make the selected site the default site||Not Archived|
|Add To Bundle||Add the entire site to a Push Publishing bundle||Always|
To add a new Site, click the +Add Site button. For information on adding new Sites please see the Adding Sites documentation.
Viewing, Editing, and Switching Sites
Sites are stored as Content, so when you choose to Edit a Site, the site properties are displayed in a Content editing window.
From this screen you may view and modify Site properties, and perform Workflow tasks such as lock, save, and publish.
A Site's properties include the following fields:
|Host Name||DNS Mapping||A name to use to reference the site within dotCMS.|
|Aliases||DNS Mapping||A list of all domains that should direct to this specific Site on your dotCMS instance.|
|Tag Storage||Tag Sharing||Sets the Tag Repository used by the site.|
|Host Thumbnail||Content||Thumbnail image of site (logo, banner, etc.), that can be pulled dynamically on the front end.|
|Run Dashboard||Option||Activates or deactivates the dotCMS dashboard statistics found under the Home tab.|
|Keywords||Metadata||Keyword metadata for the site.|
|Description||Metadata||Description metadata for the site.|
|Mobile URL||Mobile Redirect||Stores a mobile site re-direct value (if needed).|
|Google Map||Site Key||The site's Google Map key (if any).|
|Google Analytics||Site Key||The site's Google Analytics key (if any).|
|Add This||Site Key||The site's AddThis key (if needed).|
|Other||Custom Fields||Any additional fields added to the Host Content Type will be displayed (and can be edited) on this page as well.|
Extending Site Properties
The first five Site properties (Host Name, Aliases, Tag Storage, Host Thumbnail, and Run Dashboard) are required properties that must exist for all Sites. However the other properties are not required, and are provided as examples of information you may wish to store and use for the different Sites on your dotCMS instance. You may change or remove any of these optional Site properties by editing the fields of the Host Content Type. Fields which may be edited or removed are shown in the Host content type with a delete (trash) icon next to them.
In addition, you may add your own Site properties by adding your own fields to the Host content type; after adding a field to the Host content type, you may add information to that new field for all new and existing Sites.
Adding and editing fields allows you to extend dotCMS Site properties to choose what information you store for each of your sites. This enables you to store only the information you need for each site, such as web API developer keys or other site-specific information.
The System Host
The System Host is a global content store accessible from all hosts contained within the same dotCMS instance. Content which is stored on the System Host can be accessed and shared by all your dotCMS hosts.
Whenever you create a piece of content in dotCMS that allows you to specify a Host or Folder, you may select any of the following locations for the content:
- A specific Host.
- A specific folder on a specific Host.
- The System Host.
If you select a specific Host or a specific folder for content, only users and Roles with access to the specific Host and/or folder will have access to that content. However if you assign content to the System Host, the content will be available to all users with appropriate permissions to that type of Content, regardless of the Host where the content is accessed from.
System Host Limitations
Although the System Host provides a simple way to share content among multiple hosts, there are limitations to the types of content you can store and share on the System Host.
- Only individual content items of Content Types which have a Site or Folder field may be assigned to the System Host.
- Content items of Content Types which don't have a Site or Folder field are stored to the location specified for the Content Type itself. If the Content Type itself is assigned to the System Host, then all individual content items of that Content Type will be stored to the System Host and accessible from all of your other sites.
- Certain types of content can not be created on the System Host (even if the Content Type has a Site or Folder field).
- The following types of content can not be created on the System Host:
- Files (including File Assets, Images, Documents, etc.)
- Menu Links
- Vanity URLs
- Templates and Containers
- If you wish to share content of any of these content types, you may instead wish to create a separate host on your dotCMS instance which is specifically intended to store shared content such as shared files. 8 You can then set the permissions on the shared host to ensure that appropriate users from all your other hosts can access the files and other content of these types on the shared host.
- The following types of content can not be created on the System Host: