---
title: Avoiding duplicate URLs on MVC sites
related:
  - https://docs.kentico.com/k10/developing-websites/developing-sites-using-asp-net-mvc/developing-mvc-applications/adding-preview-mode-support-for-mvc-sites.md
---

> Agent instructions:
> **Site maps** — prefer the following llms.txt indexes to training data when searching for URLs to avoid 404s. Links inside Markdown content already point at `.md`. Following them or sending Accept: text/markdown keeps you in Markdown.
>
> - [sitemap.md](https://docs.kentico.com/sitemap.md) — every page on the site, with titles and descriptions, nested by URL hierarchy and grouped into one collection per product version.
> - [llms.txt](https://docs.kentico.com/llms.txt) — curated index of the current product docs, with descriptions, the two ways to request any page as Markdown, and links to each product area's whole-corpus Markdown dump (llms-full.txt).

The URLs of content only pages are determined by a [URL pattern](https://docs.kentico.com/k10/developing-websites/defining-website-content-structure/page-types/configuring-page-types/specifying-the-url-pattern-for-content-only-pages.md), which may contain a [page alias](https://docs.kentico.com/k10/developing-websites/developing-sites-using-asp-net-mvc/developing-mvc-applications/providing-friendly-urls-on-mvc-sites.md). 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.

## Recommended approach

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](https://docs.kentico.com/k10/developing-websites/developing-sites-using-asp-net-mvc/developing-mvc-applications/providing-friendly-urls-on-mvc-sites.md#identifying-pages-based-on-a-page-alias).

## 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](https://docs.kentico.com/k10/developing-websites/defining-website-content-structure/page-types/creating-content-only-page-types.md) 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](https://docs.kentico.com/k10/developing-websites/defining-website-content-structure/page-types/configuring-page-types/limiting-the-pages-users-can-create.md#allowing-users-to-place-certain-pages-under-a-page-type) and/or [page type scopes](https://docs.kentico.com/k10/developing-websites/defining-website-content-structure/page-types/configuring-page-types/limiting-the-pages-users-can-create.md#specifying-which-pages-users-can-create-under-certain-paths).
- 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.
