URL site management rules generally assume that site URLs are differentiated by their domain names or context paths:

  • Domain Names: Each site has a unique domain name.

  • URL Context Paths: All sites share the same domain, and are differentiated by their URL context paths

Note: While it is possible to mix URL context path and domain naming conventions in a single application, it is generally advisable to choose one convention and use it for all sites.

Domain Names

You can differentiate sites through unique domain names; request URLs are mapped to site IDs accordingly. This convention encompasses two approaches:

For example, you can differentiate three sites that specialize in different sports through their domain names:


You can also differentiate these sites through their subdomain names:


Note: Production site URLs and additional URLs must not include protocols such as HTTP or HTTPS. Site Administration automatically removes protocols from user-entered data; however, if you directly update the site repository’s siteConfiguration properties productionURL or additionalProductionURLs, make sure that the URLs written to these properties excludes protocols.

Domains versus Subdomains

You can rely on subdomains to differentiate sites, where all subdomains use the same parent domain. In this case, you configure the application server to set the host name in JSESSIONID cookies to the parent domain. Sharing the same session among different parent domains requires a different approach. For more information, see Sharing a Session Across Multiple Domains.

URL Context Paths

You can differentiate sites that share the same domain through their URL context paths. For example:


To handle this case, follows these steps:

Virtual Context Roots

You can configure multiple sites so they access the same web application. To do so, you set their production URLs to virtual context roots—that is, URL context paths that do not map directly to the actual content-serving web application. Instead, URL requests that contain the virtual context root are routed to the actual context root as set in the site configuration’s contextRoot property.

For example, you might set the context root for several sites to /sportswhere and set their production site URLs as follows:


The following requirements for using virtual context roots apply: