Setting page aliases

Pages can have an unlimited number of different URLs. To configure URLs, select a page in the content tree of the Pages application and open the Properties -> URLs tab:

  • Page alias - the unique name of the page in the given section of the website. Aliases form the alias path of each page, which contains all parent pages up to the root of the site’s content tree. The alias path of a page is then used to generate its default URL. For example, if you set a page’s alias to Media, then the URL is: <site domain>/<parent page alias path>/Media.aspx
  • Page URL path - the fields in this section specify an alternate URL for the page, regardless of its position in the website hierarchy. For example, if you select the Standard URL or wildcard Path type and enter /Medialibrary,the URL of the page is: <domain>/Medialibrary.aspx

Adding page aliases

You can add more URLs to pages through page aliases. Aliases do not change how the system generates the main URL of a page, they only make the given page available under other URLs.

To create page aliases:

  1. Open the Pages application.

  2. Select the page in the content tree.

  3. Open the Properties -> URLs tab.

  4. Click Add new alias in the Page aliases section.

  5. You can fill in the following properties for each alias:

    Property

    Description

    Path type

    You can choose several different URL types for the alias path:

    • Standard URL or wildcard - the alias URL is handled by the standard Kentico rewriting engine. Wildcard URLs can be used here, as described in Wildcard URLs.
    • Route - the alias URL is processed as an ASP.NET Route pattern.
    • MVC - requests to the alias URL are handled as requests for an MVC page. See Developing sites using the MVC framework for more information.

    The selection determines how the system processes the value of the Path or pattern property.

    Path or pattern

    Enter a URL path for the page alias according to the selected Path type.

    For example, if you enter /Mediagallery as the value, you can then access the page under the following URL: <domain>/Mediagallery.aspx

    Default controller
    (MVC only)

    The name of the MVC controller containing the action performed when the alias URL is accessed, without the Controller part at the end. For example, if the class is called NewsMVCController, enter NewsMVC.

    The system first searches for the specified class in the CMS.Controllers.<current site code name> namespace. If it is not found there, the CMS.Controllers.Global namespace is searched.

    Default action
    (MVC only)

    Specifies the MVC action that the controller performs when the page is accessed through the alias URL.

    Alias redirection

    Determines how the system handles (redirects) the URL when the page is accessed through the alias:

    • Use site settings (default) - with this option, the redirection behavior follows the Redirect page aliases to main URL setting specified for the website in Settings -> URLs and SEO.
    • Redirect to main URL - if selected, the system always redirects the alias URL to the page’s main URL, i.e. the alias path or custom URL path (if specified).
    • Do not redirect - if selected, the system does not redirect the alias URL. This option is recommended if the URL of the alias contains a wildcard.

    See also: Search engine optimization

    Culture

    Determines which language version of the page the system displays when the page is access through the alias URL.

    URL extensions

    Specifies additional supported extensions for the alias URL. To use custom extensions, you need to configure the system according to the instructions in Extensionless and custom URLs.

    This field is optional.

    Track campaign

    The system assigns visitors who access the page through the alias to the selected web analytics Campaign.

    For example, you can create a special alias for a page and then use the alias URL in links contained in marketing materials, such as banners, e-mails etc. This allows the system to monitor how many page views the website receives as a result of the campaign and track the activity of the visitors who arrive as a result.

    This field is optional.

  6. Click Save.

If you now switch back to the page’s Properties -> URLs tab, the new alias appears in the Page aliases section. You can add any number of aliases.

Viewing all aliases on a website

You can access a list of all aliases defined on the website (for all pages).

  1. Open the Pages application.
  2. Select a page with an alias in the content tree.
  3. Open the Properties -> URLs tab.
  4. Edit () any alias.
  5. Click View all aliases in the page header.

The information provided can help you avoid URL collisions when creating new aliases, and allows you to manage aliases from a single location.

Automatic creation of new page aliases

You can configure the system to automatically create new page aliases when a user sets a new URL path, alias or extension for a page:

  1. Open the Settings application.
  2. Select the URLs and SEO category.
  3. Enable the Remember original URLs when moving pagessetting.
  4. Click Save.