Alternative URL Paths for Umbraco Node with umbracoUrlAlias Routing Property

The umbracoUrlAlias property in Umbraco CMS allows you to define alternative URL paths for content nodes, providing greater flexibility in routing without requiring manual redirects. This feature is handy for SEO, marketing campaigns, and improving user experience by offering multiple ways to access the same content.

What is umbracoUrlAlias?

The umbracoUrlAlias is a reserved property alias in Umbraco CMS that lets you define alternate full URL paths for a content node. Unlike traditional URL rewrites or redirects, the alias functions as a masked path, meaning the original URL remains unchanged in the browser address bar.

Key Features:

  • Allows multiple custom URLs for a single content node.

  • Provides a simple way to create human-friendly URLs.

  • Useful for SEO and marketing purposes without needing external tools.

  • Works seamlessly within the Umbraco routing pipeline.

Umbraco Store Product Example: TECKNET Gaming Keyboard 15-Zone RGB Illumination All-Metal Panel

Umbraco Store Product Example: TECKNET Gaming Keyboard 15-Zone RGB Illumination All-Metal Panel

Example Use Case:

Imagine you run an online computer store, and you have a product page for a mechanical keyboard located at /store/tecknet-gaming-keyboard-15-zone-rgb-illumination-all-metal-panel.

However, you want users to find it via simpler URLs, such as /store/rgb-keyboard or /store/best-mechanical-keyboard.

By adding umbracoUrlAlias with the values store/rgb-keyboard and store/best-mechanical-keyboard, visitors can access the same content using these alternative URLs without altering the original structure.

New property with alias umbracoUrlAlias (Textstring editor)

New property with alias umbracoUrlAlias (Textstring editor)

Step 1: Add umbracoUrlAlias to a Document Type

To enable custom aliases for content nodes, you need to add umbracoUrlAlias as a property in your document type.

1. Navigate to the Settings section in the Umbraco backoffice.

2. Locate the Document Type where you want to enable aliasing.

3. Add a new property:

  • Property Name: URL Alias (can be any name)
  • Alias: umbracoUrlAlias
  • Editor: Textstring

4. Save and close the Document Type editor.

💡 Pro Tip: Provide a field description for editors, e.g., "Enter alternative URL paths separated by commas. Example: gaming-keyboard,store/best-keyboard,store/gaming-keyboard/special-offer"

Alternative URL paths for Umbraco Node

Alternative URL paths for Umbraco Node

Step 2: Configure URL Aliases for a Content Node

Once the property is added, you can configure aliases for any content node.

1. Navigate to the Content section.

2. Select the desired node.

3. Locate the URL Alias property (created in Step 1) and enter one or more alternate paths, separated by commas.

💡Example: gaming-keyboard,store/best-keyboard,store/gaming-keyboard/special-offer

4. Publish the node.

Now, the page is accessible via:

  •  /gaming-keyboard/
  • /store/best-keyboard/
  • /store/gaming-keyboard/special-offer/

while the original URL remains unchanged.

Alternative URL translations for gaming-keyboard,store/best-keyboard,store/gaming-keyboard/special-offer

Alternative URL translations for gaming-keyboard,store/best-keyboard,store/gaming-keyboard/special-offer

How umbracoUrlAlias Works

The Umbraco routing system recognizes umbracoUrlAlias values and serves the corresponding content node when a matching alias is requested.

Unlike a redirect, it does not alter the URL displayed in the browser.

Example Routing Behavior:

URL Entered Resolved Content Node
gaming-keyboard /store/tecknet-gaming-keyboard-15-zone-rgb-illumination-all-metal-panel/
store/best-keyboard /store/tecknet-gaming-keyboard-15-zone-rgb-illumination-all-metal-panel/
store/gaming-keyboard/special-offer /store/tecknet-gaming-keyboard-15-zone-rgb-illumination-all-metal-panel/

 

Troubleshooting Common Issues

1. Alias Not Working

  • Ensure the property alias is exactly umbracoUrlAlias.

  • Verify that the content node is published and accessible.

  • Check for conflicting aliases that might override the intended path.

2. URL Aliases with Slashes (/) and whitespaces Not Working

  • Ensure the full path starts without slash, e.g., store/keyboards/mechanical instead of /store/keyboards/mechanical.

  • Ensure the addresses do not contain white spaces after the comma.

Example of bad input

Example of bad input

Otherwise you will end up with broken URLs as below:

Invalid URLs generated for: /gaming-keyboard, /store/best-keyboard, /store/gaming-keyboard/special-offer

Invalid URLs generated for: /gaming-keyboard, /store/best-keyboard, /store/gaming-keyboard/special-offer

3. SEO Considerations

  • Avoid duplicate content by defining canonical URLs if multiple aliases are used.

  • Use aliases strategically for usability and SEO without overloading a single page with excessive variations.

SEO Challenges and Risks

While umbracoUrlAlias provides great flexibility, it also introduces potential SEO pitfalls if not used correctly.

Potential Issues:

  • Duplicate Content Risks: If search engines index multiple URLs pointing to the same page, it can dilute SEO rankings. Using canonical tags can help mitigate this issue.

  • Keyword Cannibalization: Assigning too many similar aliases might lead to multiple URLs competing against each other for rankings.

  • User Confusion: If different URLs appear in search results for the same content, users may struggle to determine the most relevant version.

SEO Best Practices:

  • Use Canonical Tags: Add a <link rel="canonical" href="@Model.Url()" /> tag in your template to indicate the preferred URL for search engines.

  • Block Alternative URLs from Indexing: If some aliases are for user convenience only and should not be indexed, use a noindex meta tag:

    <meta name="robots" content="noindex">
  • Monitor in Google Search Console: Check indexed URLs to ensure duplicate versions do not negatively impact rankings.

  • Use Aliases Sparingly: Assign aliases only where necessary, avoiding unnecessary duplication of URLs.

Conclusion

The umbracoUrlAlias property is a powerful yet simple way to enhance URL management in Umbraco. Whether optimizing for SEO, running promotional campaigns, or simplifying navigation, this feature provides an effective solution without:

  • additional plugins,
  • custom code,
  • complex configurations.

However, SEO risks should be carefully managed to ensure best practices are followed. Thoughtful alias implementation can boost search rankings, improve user experience, and streamline content accessibility.

↑ Top ↑