---
title: Implementing routing
related:
  - https://docs.kentico.com/13/developing-websites/implementing-routing/content-tree-based-routing.md
  - https://docs.kentico.com/13/developing-websites/implementing-routing/custom-routing-using-url-patterns.md
  - https://docs.kentico.com/13/developing-websites/implementing-routing/enabling-alternative-urls-for-pages.md
  - https://docs.kentico.com/13/developing-websites/rewriting-application-urls.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).

Kentico Xperience MVC websites respond to incoming requests using standard ASP.NET routing. ASP.NET routing is a pattern matching system that is responsible for mapping incoming browser requests to specified controller actions. When the MVC application launches, it registers one or more patterns within the framework's route table to tell the routing engine what to do with any requests that matches those patterns.

Xperience provides two mutually exclusive routing schemes you can use for your projects:

1. [Content tree-based routing](#content-tree-based-routing) (recommended)
2. [Custom routing](#custom-routing)

You can set your preferred **Routing mode** in the **Settings** application, in the **URLs and SEO** category under the **Routing** section.

Additionally, you can use the [alternative URLs](#alternative-urls) functionality to make pages accessible under any desired URLs.

## Content tree-based routing

With content tree-based routing, the system automatically generates and matches page URLs based on their position in the website's [content tree](https://docs.kentico.com/display/K2020/Working+with+pages). You do not need to manually map any route templates in the MVC application. All routing logic is handled for you by the system. For more advanced routing scenarios, you can implement custom controllers and actions that take over the handling for specified requests, allowing you to inject custom logic into the routing process.

See the [Content tree-based routing](https://docs.kentico.com/13/developing-websites/implementing-routing/content-tree-based-routing.md) section for more information.

## Custom routing

A routing model independent of the Xperience application. All routing on the MVC site needs to be implemented manually using standard [ASP.NET routing](https://docs.microsoft.com/en-us/aspnet/mvc/overview/older-versions-1/controllers-and-routing/asp-net-mvc-routing-overview-cs) functionality. To make Xperience pages available under custom routes, you need to set _URL patterns_ for [page types](https://docs.kentico.com/13/developing-websites/defining-website-content-structure/managing-page-types.md). The URL patterns must match route templates you register in the MVC application. Moreover, you can give content editors control over a part of the page URL via the [page alias](https://docs.kentico.com/13/developing-websites/implementing-routing/custom-routing-using-url-patterns/identifying-pages-based-on-url-parameters.md) field or other custom parameters.

See the [Custom routing using URL patterns](https://docs.kentico.com/13/developing-websites/implementing-routing/custom-routing-using-url-patterns.md) section for more information.

## Alternative URLs

[Alternative URLs](https://docs.kentico.com/13/developing-websites/implementing-routing/enabling-alternative-urls-for-pages.md) allow individual pages to become available under any number of URLs. Depending on the site's configuration, the system either redirects to the page's main URL or displays the page content under the submitted alternative URL.

This feature can be used together with either routing mode.
