help.axcms.netAxinom Logo
Save Save Chapter Send Feedback

Managing multiple sites

How to manage multiple sites with one CMS instance.

For managing multiple sites it is possible to install multiple instances of the to the same server. These instances are completely independent of each other. There is no limitation for the number of installations on one server. All instances share single and the same IndexService and MailCenter.

Using the same content (pages, documents) and/or the same user-rights sets, it might be more convenient to manage these sites in a single instance of the The multisite-feature of the is capable to manage different language versions of the same content. There are some services for implementing this feature.

Basic concepts

Using multi-site features, you create all pages (for all Sites) in the same CMS and structure them using the Navigation. We consider to define a naming convention for the pages (e.g. prefixes en_ and de_ for english and german Sites), even though this is not necessary.

First create so called Site Nodes: navigation nodes, serving as roots of your Sites. These nodes are never presented to the users, they only help to distinguish between the Sites.

Site Nodes are defined directly under the root of the Navigation tree (predefined node 6). In the examples below we will create a company presentation for three countries: USA (english), UK (english) and Germany (german).

Homepage resolution

For our example we define an own domain name for each site, like, and All these names are to refer to the same Web-Server (where the is installed), but a user should get to different entry points depending on the address he used. Therefor you have to associate the correct homepage with each site. To do this, follow these steps:

  • Define the DNS for all domains you want to use to refer to your site. They all have to refer to the IP-Address of your

  • Define all host headers in IIS for your Site. You have to define all names created in the previous step in the DNS.

  • Enter URLs that correspond to the respective Site to the field "Addition" (ExternID in the database) of each site node. You can use multiple URLs for the same Site. In this case, write all the names comma-separated (spaces allowed). E.g.,,

  • Create a Homepage for each Site and associate it with the site node and define it as a standard page.



If you type without specifying a page, the defaultMultisites.aspx is called. This page selects among all the site nodes the node, that has in its Addition (ExternID) list. If found, it redirects to the page, associated to this site node. If not, it redirects to the pages, which have been specified in the web.config:

   <add key="Homepage" value="/Homepage.AxCMS" />

DefaultMultisites.aspx is the page, which the logic of the homepage solution is implemented to. Please define this page as the default document for the Live-System in the IIS, as shown on the screenshoot below.

Which Template to use?

If you have different layouts and different functionalites for different sites, it is recommended to create an own page template for each site. If the sites only differ by their content, you can reuse the same template for all sites. You have to develop the template the way, that it takes into account to which Site a Page belongs. For example, navigation controls should show the part of the tree beginning at the respective site node. As an alternative, you may want to use different style sheets for different Sites.

Site-Dependent Behaviour

To be able to develop in a behaviour-dependent mode on the current site, you have to know at runtime, at which site you are. The process works like this:

  • Find the currently requested page
  • Find the navigation node of the page
  • Find the site node, under which the navigation node is placed

This process is implemented in the class MultisiteContext and is transparent for you. You should just override the function CreateContext in your Template (better: BaseTemplate of your project) to return MultisiteContext-object:

protected override AxNavigationContext CreateContext()
return new MultiSiteContext();

After that you can access the properties Root and RootID of the MultisiteContext - it is exactly the site node for the current site (or its ID). Particularly you can use this method with your navigation control to find the right root for the navigation nodes:

((MultisiteContext) ((TemplateBase) this.Page).NavigationContext).RootID

Language Considerations

If you want different Sites to have the user interface in different languages, it is possible with You have to consider 3 aspects of the problem:

  • The language of the content
  • The language of the Site
  • The language of the user
  • Translation of the templates

Language of the content

The editor decides, which language is used for the content. does not influence this. But offers some features, which help working with content in different languages.

You can establish relations between pages, documents and categories. Thus you can create a relation between two arbitrary pages. It is useful to link similar pages in different sites/languages. If you have such relations, you can easily switch between these pages.

If you already have a page in one language and want to start working on another language version of it, you can save time on recreating page structures by copying the content of the existing page and then translate only the texts. Create a new page, save it (click Apply) and then "Copy content from". Select the source page. Content is copied into the new page. The relation named "Relation" is automatically created between old and  new page.

If you created your presentation in one language and now would like to copy the whole tree to start working with another language version, you can do it with a special stored procedure. This procedure must be customized for your project, a template is available from Axinom on request.


Defining the language of the site

If you want to switch the language of a site depending on the user, you have to save the matching, which language is used by each of your sites. The simplest way to do this, is to create a category for each language (e.g. German, English) and then categorize the site nodes with these categories. After that you can use this information to set the user language depending on the Site (see below).


Determining target language of the user

The translation module uses the language, set in Thread.CurrentUICulture of the current executing thread as target language. So this language should be set before the render-event of the page processing cycle. The usual way to set the language, is to write an HttpModule setting it. An HttpModule could set the language in different ways.

The BrowserLanguageModule, delivered with the, reads the languages, passed from the browser and takes the first one. (If this language is not supported by the, the default language, currently german, is used.)

Another implementation is FixedLanguageHttpModule. It reads an option from web.config and sets the language respectively. This simple module can be used, if your site uses only one language, different from the language.

The next possibility is to write your own HttpModule. Such module could set the language, for example, depending on the site. The module should determine the site that the user is currently visiting, determine the language defined for this Site and set this language in the current thread.

Or you set Culture in InitContext function of your Context in your templates project.


Translation of the templates

Text, coded directly into your templates must be translated "on-the-fly". You can do this using resources and resource-DLLs (standard Microsoft approach for internationalization) or you can use the Axinom technology AxLanguage, which is also used for the translation of the Read more about AxLanguage at Multi-Language-Support in the