U4-878 - The umbracoUrlAlias property should do a 301 redirect

Created by Sebastiaan Janssen 19 Sep 2012, 10:17:38 Updated by Stephan 16 Apr 2013, 15:08:02

Right now it just gives a 200 and serves the page.. on different URLs, which search engines will punish.


Stephan 12 Dec 2012, 14:00:03

I thought that was the purpose of umbracoUrlAlias, to accept an alternative url for a node -- not to act as a 301-redirect feature. We probably need two different things here?

Casey Neehouse 12 Dec 2012, 14:27:21

I agree with Stephan; this is not the intended behavior. You can easily do your own Canonical redirect for a page by comparing its own NiceUrl with the current request and redirecting as necessary.

Dan Booth 12 Dec 2012, 14:32:37

It's the umbracoRedirect property that should do the 301 redirect (I think it currently does a 302).

Sebastiaan Janssen 12 Dec 2012, 15:25:24

Come to think of it, we probably need a umbracoPermanentRedirect property (because people may be relying on umbracoRedirect giving a 302) but we don't really want to introduce more magic properties.

Stephan 18 Feb 2013, 09:26:55

I was working on a "umbracoUrlAliasDoesRedirect" but I'm not sure we want it anymore. It's going to be confusing and as @casey says, alias is alias... So instead I'd propose we go with:

  • umbracoUrlAlias : acts as of today
  • umbracoInternalRedirect : acts as of today
  • umbracoTempRedirect : redirects (301) to a specified url
  • umbracoPermRedirect : redirects (302) to a specified url

But then we're introducing more magic properties... @sebastiaan, what's the take on this? Is there an issue with magic properties?

Well, there are: umbracoUrlAlias is just a text string so it's never cleaned up as aliases should be, and you can enter a totally invalid url there. But, more generally: do we accept magic properties? Or is there a push against them?

Sebastiaan Janssen 18 Feb 2013, 09:47:44

@Stephan There's work being done on slowly rolling a 301 redirect package into Umbraco, indeed I don't think we should have any more magic properties cluttering up the codebase. So, for now, people can use existing packages and url rewriting, in the future we'll have this built in.

I'm closing this request accordingly.

Stephan 18 Feb 2013, 09:51:19

Great. Who's working on that 301 thing? Would be happy to chat 'cos there are a few decisions I'm making at pipeline level that could really help them, but I'd appreciate their input.

Sebastiaan Janssen 18 Feb 2013, 11:40:03

Lee Messenger and Stefan Kip (@yodasmydad / @kipusoep)

Bo Kingo Damgaard 16 Apr 2013, 14:54:20

@Stephan: Isn't that umbracoTempRedirect should return 302, and umbracoPermRedirect should return 301? 301 ia permanent

Stephan 16 Apr 2013, 15:08:02

@Bo: these would be new properties, right? But I'm not sure we want to add more of them. Rather use a 301-rewriting package.

Priority: Normal

Type: Feature (request)

State: Obsolete


Difficulty: Very Easy


Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version:


Story Points: