Avoiding duplicate URLs on MVC sites

The URLs of content-only pages are determined by a URL pattern, which may contain a page alias. As page aliases are guaranteed to be unique only within a given sub-section level of the content tree, there are situations in which different content can end up having the same URL. You can use one of the following approaches to prevent conflicts in content URLs.

Only use the page alias to add a human-readable component to your URLs, and include another parameter into your URL patterns to serve as a unique identifier. For example, a NodeGUID. See how you can uniquely identify pages when using page aliases in URLs.

Alternative approaches

  • Restrict your website structure so that pages of the same type (with the same URL pattern) can never have the same page alias. For example, you can allow each type of content-only pages only in one section of the content tree. If you need to use a content-only page type in a different section of the content tree, create a new page type with a different URL pattern. To enforce these restrictions, use allowed child page types and/or page type scopes.
  • Allow multiple pages with the same page alias and handle duplicate page aliases on the side of the MVC application. Make sure your content editors know of the potential limitations of this approach.