Using the umbracoUrlAlias property on a page in Umbraco gives you the ability to set up one or more different URLs for a single page.

The page structure of your site might create long URLs, and you may want to use a shorter one, the umbracoUrlAlias will do that for you. Or a page may have previously existed with a different URL, and you want to catch the traffic going to that URL and get them to look at this page, the umbracoUrlAlias will do that for you as well.

Scenario

At the time I am writing this post, my most popular blog post is the one I wrote about 10 golden rules for becoming a better programmer.

The URL for that page is http://www.codeshare.co.uk/blog/10-golden-rules-for-becoming-a-better-programmer/
Using the umbracoUrlAlias property, I can create a shorter URL for the page like this http://www.codeshare.co.uk/10-golden-rules

It goes to the same page, and the URL stays as the shorter one, in other words, it doesn't do a redirect.

How to set it up

Just create a property on your page document type and call it Umbraco Url Alias. This will give it a property alias of umbracoUrlAlias.

Now in the content of that page, look for the property you created and enter an alternative URL.
Please note that the values you use must be lowercase, not use a leading slash and not use a trailing ".aspx" or trailing slash. If you are adding multiple values, they must be separated with a comma.

The #1 Writing Tool

So for my 10 golden rules post, the value I put in was:

I also wanted it to work for other variations, so I added them too.

It means that the following URLs all go to the original page.

http://www.codeshare.co.uk/golden-rules 
http://www.codeshare.co.uk/10-golden-rules 
http://www.codeshare.co.uk/goldenrules 
http://www.codeshare.co.uk/10goldenrules

That should be all you need to know to get it working. If you need any help, please leave a comment.

Paul Seal

Umbraco MVP and .NET Web Developer from Derby (UK) who specialises in building Content Management System (CMS) websites using MVC with Umbraco as a framework. Paul is passionate about web development and programming as a whole. Apart from when he's with his wife and son, if he's not writing code, he's thinking about it or listening to a podcast about it.

Proudly sponsored by

Moriyama

  • Moriyama build, support and deploy Umbraco, Azure and ASP.NET websites and applications.
AppVeyor

  • CI/CD service for Windows, Linux and macOS
  • Build, test, deploy your apps faster, on any platform.
elmah.io

  • elmah.io is the easy error logging and uptime monitoring service for .NET.
  • Take back control of your errors with support for all .NET web and logging frameworks.
uSync Complete

  • uSync.Complete gives you all the uSync packages, allowing you to completely control how your Umbraco settings, content and media is stored, transferred and managed across all your Umbraco Installations.
uSkinned

  • More than a theme for Umbraco CMS, take full control of your content and design with a feature-rich, award-nominated & content editor focused website platform.
UmbHost

  • Affordable, Geo-Redundant, Umbraco hosting which gives back to the community by sponsoring an Umbraco Open Source Developer with each hosting package sold.