U4-2499 - Remove the possibility for accessing pages with nodeid's or give a redirect option

Created by Michael Nielsen 11 Jul 2013, 08:16:43 Updated by Sebastiaan Janssen 05 May 2016, 07:17:10

A page is accessible both via niceurl.aspx and nodeid.aspx

This gives the possibility for duplicate content. This is unwanted behaviour and should be removed, or at least there should be a redirect option in place so all nodeid urls are redirected to their some possibility to have the nodeid.aspx automatically

2 Attachments


Sebastiaan Janssen 11 Jul 2013, 13:42:24

Re: duplicate content, if you don't link to it, search engine spiders will not pick up the urls so it's not an issue.

Stefan Kip 12 Jul 2013, 09:30:20

I disagree. The page IS accessible via multiple URL's, which IS bad for duplicate content. The nodeid.aspx url should not be available anymore. Question though; what was it used for anyway?

Sebastiaan Janssen 12 Jul 2013, 09:35:06

Preview mode.

Again, if you don't link to it, Google doesn't know about it, so there is no problem. Find me 1 Umbraco site on Google that has both the nice url and the numerical url listed and I'll send you a beer. ;-)

Stefan Kip 12 Jul 2013, 09:41:50


Stefan Kip 12 Jul 2013, 09:43:08

Btw, it sounds like you're saying "There's this bug, but if nobody visits the page nobody will know"... How about injecting a canonical meta tag if the page was requested by the /nodeid.aspx url?

Sebastiaan Janssen 12 Jul 2013, 09:48:57

I'm not saying we shouldn't change the behavior but just that it has not been a problem in the past 5+ years that umbraco has been doing this. Yes, you can add meta tags, but Umbraco touts not messing with your templates so this won't be done automatically.

Rasmus Hjulskov 24 Mar 2015, 11:49:19

http://www.at-bo.dk/ >>> 1092

I would prefer the beer cold and dark — surprise me! Ship it to Illumi A/S, Europlads 16, 8000 Aarhus C.

Sebastiaan Janssen 24 Mar 2015, 12:05:43

@rhl You have deserved your beer, for sure! However, may I advise you not to actually link to the node Id's.. :-)

Stefan Kip 24 Mar 2015, 12:15:12

Lol :D

Sebastiaan Janssen 24 Mar 2015, 12:19:36

@rhl Three beers (one for each node) are on their way. Please report back which one was the best.

Also, this was a one-time offer, no more beers to be had here. ;)

Sebastiaan Janssen 24 Mar 2015, 19:09:54

Commit made by '''Sebastiaan Janssen''' on ''2015-03-24T20:09:48+01:00'' https://github.com/umbraco/Umbraco-CMS/commit/9dfccd86fd3961712be529042941c2a62f7c6bb8

U4-2499 Remove the possibility for accessing pages with nodeid's or give a redirect option

#U4-2499 Fixed Due in version 7.2.5

Asbjørn Riis-Knudsen 25 Mar 2015, 15:57:28

And what about people who actually use this feature? This has actually been useful for providing short URLs for pages. Suddenly removing this in a patch release could quite possibly break sites.

Sebastiaan Janssen 25 Mar 2015, 16:06:53

@Asbjørn.Riis-Knudsen We're not changing the default behavior of course. It's a configuration option that people can set. The default for disableFindContentByIdPath is false:

<web.routing trySkipIisCustomErrors="false" trySkipIisCustomErrors="false" internalRedirectPreservesTemplate="false" disableAlternativeTemplates="false"> internalRedirectPreservesTemplate="false" disableAlternativeTemplates="false" disableFindContentByIdPath="false" />

Asbjørn Riis-Knudsen 25 Mar 2015, 16:09:29

@sebastiaan Ah, hadn't caught that bit. That sounds like the ideal solution, making it configurable :)

Martin Griffiths 02 Apr 2015, 14:44:26

Doesn't preview function by ID? Will preview continue to work with this disabled?

Sebastiaan Janssen 02 Apr 2015, 15:18:19

Good point, I've now made it work with preview mode as well (https://github.com/umbraco/Umbraco-CMS/commit/fa05342).

Also, before anyone asks: yes you can make a node in the root of your site with the name 1090 and it will work to go to http://mysite.com/1090

Murray Roke 05 May 2016, 00:28:27

I have been building a RSS feed, it does not like unicode urls, and it likes to have a permalink, I think http://example.com/1090 would be the ideal url for rss guid field and link field to ensure permanence even if the name changes, and ensure only ascii characters in the path.

I think this url ( http://example.com/1090 ) should be configurable to redirect to the NiceUrl. This ticket suggests such a redirect for the solution. ... or should I create a new Issue/ticket?

Side note: a workaround could be to set disableFindContentByIdPath="true" and build a 404 handler to do the redirect, but a config setting sounds nicer :-)

Sebastiaan Janssen 05 May 2016, 07:17:10

No config setting available I'm afraid. 404 handler is recommended.

Priority: Normal

Type: Feature (request)

State: Fixed


Difficulty: Normal

Category: Architecture

Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version: 7.2.5


Story Points: