Return to doc.sitecore.com

Valid for Sitecore 5.3
Aliases

Sitecore determines the default URL for an item based on its path; for instance the default URL for /sitecore/content/home/hr/jobs is /hr/jobs.html.  In some cases it is useful to have shorter URLs which map to longer paths, for instance /jobs.html may be preferable for marketing materials (email campaigns, print advertisements, etc.).  Sitecore supports alternate URLs through a feature known as aliases.

Aliases are based on the System/Alias template and defined under /sitecore/system/Aliases, though as of Sitecore 5.3 they can be created with the ribbon (see the Presentation Tab description).  Each alias name must be unique; if a single Sitecore instance is hosting multiple sites under a single document root they cannot both use the same alias (for instance /jobs).  The alias template contains a single field in the data section which allows for selection of the target item.

It is generally advisable to prevent search engines from indexing multiple URLs for a single content item, therefore aliases are intended for marketing materials only.  Sitecore features for generating URLs such as the sc:link XSL extension control, the sc:path XSL extension function, the Sitecore.Data.Items.Item.Paths.GetFriendlyUrl() method as well as links generated by the HTML editors should use the default URL for each item; aliases should not be hard-coded into renderings, include files or any other type of presentation component.