Create a site collection and a site

Version: 10.4

The SXA content architecture includes site collections and sites. SXA supports multiple site collections, which means that you can run multiple sites on a single instance of Sitecore. Each site collection can include multiple related sites, for example, to support multiple brands for a single company or multiple languages or locations for a single brand. Organizations can support multiple languages through one-to-one translated versions (native Sitecore language support) or use a model with a separate site for each supported language.

For example, an international clothing company could have different site collections for the different brands of clothing and different sites for the specific countries.

Create a site collection and a site collection folder

If you have multiple sites that need to share resources they must be created within one site collection. With SXA's multiple-site collection architecture, you can provide each site collection a dedicated share of the Sitecore instance including its data templates, configuration, user management, site collection individual functionality, and non-functional properties. 

To create a site collection:

  1. In the Content Editor, right-click the Content item in the content tree, click Insert, Site Collection.

  2. In the wizard, enter a name for the site collection, select the modules, and click OK.

For more complex solutions, you can use groups of site collections. For example, a multinational selling consumer goods could have the following site collection folders and site collections:

Company (site collection folder)

  • Cosmetics (site collection folder)

    • Brand A (site collection)

    • Brand B (site collection)

  • Laundry detergents (site collection folder)

    • Brand A (site collection)

    • Brand B (site collection)

    • Brand C (site collection)

  • Hair care (site collection folder)

    • Brand A (site collection)

    • Brand B (site collection)

    • Brand C (site collection)

    • Brand D (site collection)

To create a group of site collections:

  • Right-click the content item in the content tree, click Site Collection Folder, enter a name and click OK.

Note

If you want to move site collections between environments, you can package site collections with the SXA Tenant Exporter.

Create a site and a site folder

The site collection is a top-level container for the sites underneath. Sites in the same site collection are related, for example, because they share the same set of templates or part of the media library. Sites are the items that represent the website and consist of pages, data, designs, and partial layouts.

To create a site:

  1. In the Content Editor, right-click the site collection to which you want to add the site, click Insert and click Site.

  2. In the wizard, on the General tab, enter the name for the site.

    Important

    SXA site names cannot contain blank spaces.

  3. On the Modules tab, select the modules and click OK.

  4. On the Theme tab, either create a new theme by selecting Create new theme or select one or more existing theme(s) and click Ok.

    The THEME tab in the Create a new SXA site dialog.
  5. On the Grid tab, select the grid and click OK.

    Note

    It is important to be aware that changing the grid system after you create your site requires many manual changes. Because of the references on your pages to the previous grid system, making a change to the grid system will break your layout.

    Your new site is available immediately.

  6. The SXA Site Manager dialog box displays a list of all SXA sites on your Sitecore instance. The icons indicate whether the site can be accessed or whether there is a conflict. If there are site conflicts that you need to solve, you can:

    Move the site – click the site and on the ribbon, click Move Up. Use the icons move up and move down.

    Correct the site definition – click the site and on the ribbon, click Open. In the Basic section, change the site name, environment, virtual folder, or the host name.

Note

You can create a duplicate of a site, by using the clone script.

For governance reasons, you can decide to use groups of sites. For example, for an internalization model where you create different sites for different countries:

  • Europe (site folder)

    • Poland (site)

    • Denmark (site)

    • The Netherlands (site)

    • Ukraine (site)

  • Asia (site folder)

  • Africa (site folder)

To create a group of sites:

  • Right-click the site collection in the content tree, click Site Folder, enter a name and click OK.

Note

SXA defines sites as Sitecore items. This enables to mitigate an issue with website restart after each change in Sitecore.config file. You can create new sites with SXA without a need to restart your Sitecore instance. If for some reason you decide to define sites in the config file instead of using items, makes sure to add IsSxaSite="true" parameter to your site definition XML node. SXA will use this parameter to determine whether a defined site is an SXA site or not. For example:

RequestResponse
<site name="C" IsSxaSite="true" enableTracking="true" virtualFolder="/mySXA" physicalFolder="/" rootPath="/sitecore/content/A/B/C" startItem="/Home" database="web" domain="extranet" allowDebug="true" cacheHtml="true" htmlCacheSize="50MB" registryCacheSize="0" viewStateCacheSize="0" xslCacheSize="25MB" filteredItemsCacheSize="10MB" enablePreview="true" enableWebEdit="true" enableDebugger="true" disableClientData="false" cacheRenderingParameters="true" renderingParametersCacheSize="10MB" />

Do you have some feedback for us?

If you have suggestions for improving this article,