Setting page aliases

Pages (with the exception of content only 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

    URL paths or routes with custom extensions

    By default, only paths that are extensionless or have the aspx extension are supported. This limitation also applies to Route or MVC type paths.

    If you wish to define paths or routes with custom extensions or containing the period character, you need to configure the application to handle custom extensions. See Extensionless and custom URLs.

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](/k11/configuring-kentico/configuring-page-urls/wildcard-urls){.internal-link }.- **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.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)

    Obsolete - use only when developing MVC sites using the CMSApp_MVC project.

    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)

    Obsolete - use only when developing MVC sites using the CMSApp_MVC project. 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](/k11/configuring-kentico/configuring-page-urls/wildcard-urls){.internal-link }.See also: [Search engine optimization](/k11/configuring-kentico/search-engine-optimization){.internal-link }

    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.

  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 pages setting.
  4. Click Save.