AI agents: the content index is at /llms.txt. Every page is also available as Markdown — send the request header Accept: text/markdown, or append .md to the page URL.
Xperience Docs

Cookie consent

We use necessary cookies (opens in a new tab) to run our website and improve your experience while browsing. Additional cookies are only used with your consent. You may revoke your consent on the Cookies Policy (opens in a new tab) page or in your browser at any time.

Configure (opens in a new tab)
  • Documentation
    Administration interface basicsDevelopers and adminsBusiness usersChangelogGlossary
  • Guides
    Welcome to Xperience by KenticoAdministration interface basicsCustomer journeysDigital marketingConfigurationDevelopmentArchitectureUpgrade to Xperience by Kentico
  • Training
    For AdminsFor Business usersFor DevelopersFor Solution architects
  • API Examples
    ConfigurationContent managementDevelopmentDigital marketing
  • Changelog
    Documentation updatesSecurity advisories
  1. Home
  2. Developers and admins
  3. Development
  4. Routing
  5. Custom redirects

Custom redirects


Was this page helpful?

Send us feedback Go back to top
  • Community Questions & Answers (opens in a new tab)
  • Contact support (opens in a new tab)

Xperience provides the IWebPageRedirectManager API, which enables the creation of redirects from custom URL paths to pages. Custom redirects can be useful during upgrades or for creating redirects from pages that were deleted. Existing redirects from deleted pages can also be managed through IWebPageRedirectManager.

Custom redirects are not intended for redirects from existing pages. To create a redirect from an existing page, the page has to be unpublished via the admin UI or the IWebPageManager API. The redirect can be created during the process or added later via the admin UI.

Create or update a custom redirect

To create a custom redirect, use the CreateOrUpdateRedirect method in IWebPageRedirectManager. The parameter webPageUrlPath is used to pass the URL path to redirect from.

If the webPageUrlPath parameter matches a former URL that is not a redirect from a deleted page, or when it matches any URL of a page, the system throws an exception.

Existing URLs managed by the system that don't fulfill the conditions above are custom redirects or redirects from deleted pages. If the provided path matches such a URL, the target of the redirect from this URL is updated. The system checks only against the URLs included in the content tree-based routing. Otherwise, if the provided URL path doesn't match any existing URL path in the system, the custom redirect is created with the provided parameters.

See API examples for a code sample of creating a custom redirect.

On this page

  • Create or update a custom redirect

Related pages

  • Content tree-based routing
  • Edit and publish pages