How to configure site-specific aliases

  • Sitecore XP implements Aliases functionality to allow configuration of multiple web site URLs to access any content item.

    You can read more about aliases in the Data Definition API Cookbook.

    By default, alias configuration is shared between all Sitecore sites from a Sitecore XP solution.

    In some scenarios, it might, however, be required to configure site-specific aliases.

    For example:

    • Some aliases might need to be configured to work only with certain sites.
    • Different sites might need to have aliases with the same name pointing to different site-specific items.

    This article describes how to customize aliases functionality to introduce site-specific aliases.

  • To implement site-specific aliases:
    1. Replace the default AliasResolver processor of the httpRequestBegin pipeline with the custom one that takes into account the context site name when resolving aliases. Use the AliasResolver file as an example.
    2. Under the /sitecore/system/Aliases item, create folders with the name of the sites that require support for site-specific aliases. Check the site names in the <sites> section of the web.config file.
      For example, items hierarchy might look like the following:
      This allows aliases placed under the site folders to only be applied to the corresponding Sitecore sites.
    3. Create alias items under the corresponding site folder manually. Alternatively, use Aliases dialog from the Presentation ribbon, while always adding the <websiteName>/ prefix before the actual alias name when using this dialog.
    4. If there is a need to create global aliases that would work for all sites, place the corresponding alias items under each site folder.
    • After the customization above, only aliases placed under the site folders are resolved.
    • To allow selecting all child items of the /sitecore/content node using the Linked Item field, do the following:
      1. Navigate to the /sitecore/templates/System/Alias template.
      2. Change the Source value of the Linked Item field to /sitecore/content.

Applies to:

CMS 6+

September 11, 2015
November 23, 2020

Reference number:



  • CMS