Setting domain names for sites

Every site runs on specified domain names. The domain names determine where visitors can find the live site, and where editors or other users access the administration interface.

Sites have the following basic properties related to domain names:

  • Presentation URL – the URL where the live site application is running.
  • Administration domain name – the domain name under which the site’s administration interface is available.

Presentation URL format

Administration domain name format

Enter the full URL of your live site application’s website root.

The presentation URL value must include the URL scheme (protocol). If the site is hosted in a virtual directory, include it in the URL path component.

For example:

  • https://www.SiteDomain.com
  • http://localhost/MvcApplication

Enter the domain name without the URL scheme (protocol) and www prefix. Administration domains automatically cover all URL schemes and www prefix combinations.

Include the port number if it is different than 80. May optionally contain a URL path component.

Correct:

  • mycompany.com
  • partners.mycompany.com
  • mycompany.com:8080
  • mycompany.com/xperience

Incorrect:

  • http://mycompany.com
  • www.mycompany.com

On Xperience instances with multiple sites, the domain name and Presentation URL values must be unique for every running site. A single site’s Presentation URL and Administration domain name can share the same basic domain name, but the values cannot be completely identical (for example, the difference can be in the URL path component).

Note: You need to have a valid license for the domains in both the Presentation URL and the Administration domain name.

To set the domain names for an Xperience website:

  1. Open the Sites application.
  2. Edit the site on the General tab.
  3. Type the URL leading to the live site into the Presentation URL field.
  4. Type the administration domain into the Administration domain name field.
  5. Click Save.

Domain names for local development

When running or debugging your administration application and website locally during development (for example using the built-in web server in Visual Studio), you need to use the domain names assigned to your site in Kentico Xperience.

  • You can adjust the Project URL of your project accordingly in your development environment (Visual Studio).
  • If you wish to run on a localhost domain, but your site has different domain names assigned, you need to add localhost as a domain alias.

Adding domain aliases

Domain aliases are alternative domain names that lead to the same website. You can add any number of domain aliases for each site, both for the live site (Presentation URL) and the administration. Aliases can be particularly useful when building multilingual websites.

For example, if your website runs on mycompany.com as its main domain and you wish to make the same site available under the my-company.co.uk domain, you need to create a domain alias.

Note: You need to have a valid license for every domain alias. Domain alias licenses are free of charge if you already own a license for the main domains.

To create a domain alias for your website:

  1. Open the Sites application.
  2. Edit your site.
  3. Expand Domain aliases and select either the Live site or Administration sub-tab.

Live site aliases

The Live site sub-tab allows you to add domain aliases for the live site:

  1. Click New live site alias.

  2. Type the alternative presentation URL into the Presentation URL field.

    • Use the same format as for the site’s main presentation URL, including the protocol or www prefix.
  3. (Optional) For multilingual sites, select a Visitor culture.

    • The domain alias is used for visitors who select the given culture (URLs of pages translated to this culture will contain the defined Presentation URL).
    • Note: If the site uses content tree-based routing, the Visitor culture field is only available when the URL format for multilingual sites setting is set to Domain.
  4. Click Save.

Your live site is now available under the URL specified in the alias (in addition to the main presentation URL and any other live site aliases).

Administration aliases

The Administration sub-tab allows you to add domain aliases for the administration interface and specify their preview presentation URLs.

Administration domain aliases let you specify under which domain names the Xperience administration interface is accessible. For each administration domain alias you can also specify a Preview presentation URL, which is then used when previewing live site content within the scope of the administration interface. For example, when displaying website content in the preview mode or in the page builder, the displayed content is sourced from this URL.

For example, preview presentation URLs can be useful when preparing the environment for content staging. During development, you may want to allow editors to edit a particular instance of your site (e.g., a testing instance) only via a specific administration domain alias. On the live (production) version, you can then use the main Administration domain name(specified on the General tab) only with the main Presentation URL.

  1. Click New administration alias.

  2. Type the alternative administration domain name into the Administration domain name field.

    • Use the same format as for the site’s main administration domain name, without the protocol or www prefix.
  3. (Optional) Enter a Preview presentation URL.

    • Use the same format as for the site’s main presentation URL, including the protocol or www prefix.
  4. On multilingual sites and with the Preview presentation URLspecified, select a Visitor culture.

    • The Preview presentation URL is used within the context of the administration interface when previewing the selected culture (e.g., pages translated to this culture previewed in the page builder will be sourced from the specified Preview presentation URL).
    • Note: If the site uses content tree-based routing, the Visitor culture field is only available when the URL format for multilingual sites setting is set to Domain.
  5. Click Save.

The administration interface for the given site can now be accessed under the specified domain alias.