The site host fields

In SXA, site hosts (also called site definitions) are done at the item level. This means that you do not have to restart a website after each change in the Sitecore.config file. You can create new sites without restarting your Sitecore instance.

You can change the site hosts fields in Sites, as well as in Content Editor, in sitecore/content/<site collection>/<site>/Settings/Site Grouping/<site>. The site hosts items are equivalent to Sitecore <site> nodes that you define within your config file if you build the site without SXA.

The following table lists some of the site host fields, their Sitecore XP equivalent (if any), and a description:

Field

Sitecore equivalent

Description

Site name

name

The name of the site. When you choose a name for the website, you must avoid using characters that are invalid for the website cookies. Therefore, do not use control characters, spaces (" "), semicolons, or commas in your website names.

Valid for environment

Defines the environment that the site is resolved for. Allowed values are empty string, *, or an environment name without blank spaces. Empty string and * have the same effect: The site can be resolved for every environment. You must define the environment name that this field refers to in your config file.

Target hostname

targetHostName

Specifies the host name used while generating links and sitemaps. This field is required for generating sitemaps.

Warning

In XM Cloud, a site can have multiple site hosts as long as they share the same target hostame.

Hostname

hostName

Defines the host name that the site resolves to. In a multisite setup, this field defines a specific URL for each site.

Start item

startItem

Defines the path to the root item of the site.

Linkable site

Select to make a site linkable.

Other Properties

Place for additional attributes for SXA sites that you would normally have in your site definitions config file.

Sitecore or Sitecore modules might require other properties that were not explicitly specified in the Site Grouping node. You can configure these properties in the Other Properties field by specifying the key/value pair. These properties are then sent verbatim to Sitecore site provider.

For example, SXA does not have a port property that lets you specify which port your site is exposed under.

In the Content Editor, define additional site definition properties

Predefined application editing host

Specifies the item that contains information about the editing host, including the application. The Default item has the following path: /sitecore/system/Settings/Services/Rendering Hosts. The values set on this item override the corresponding values from the site-specific Settings item.

Language

language

The default content language for the site.

Language Embedding

languageEmbedding

Select to show the language in the URL.

Do you have some feedback for us?

If you have suggestions for improving this article,