---
title: Specifying the URL pattern for content-only pages
related:
  - https://docs.kentico.com/k12sp/developing-websites/defining-website-content-structure/creating-and-configuring-page-types/creating-content-only-page-types.md
  - https://docs.kentico.com/k12sp/developing-websites/configuring-page-urls-on-mvc-sites.md
  - https://docs.kentico.com/k12sp/configuring-kentico/managing-sites/setting-domain-names-for-sites.md
  - https://docs.kentico.com/k12sp/developing-websites/mvc-development-overview.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).

[Content-only](https://docs.kentico.com/k12sp/developing-websites/defining-website-content-structure/creating-and-configuring-page-types/creating-content-only-page-types.md) page types do not have a presentation URL by default. This means that content editors cannot access content-only pages in the **Preview** mode or when opening them on the live site via the administration interface. Content editors also are not able to create page links using the [text editor](https://docs.kentico.com/k12sp/managing-website-content/using-the-editor.md). If you want your content-only pages to support this functionality, you need to specify the **URL pattern** property of their page type when:

- Using a standalone [MVC application](https://docs.kentico.com/k12sp/developing-websites/mvc-development-overview.md) which handles the presentation of your content-only pages.
- Using [Portal Engine](https://docs.kentico.com/k12sp/developing-websites/developing-websites-using-portal-engine.md) and employing content-only page types.

You will usually only want to specify the property for pages with a separate presentation. Pages that store content that is only used when aggregated on a different page may not need to have their own _URL pattern_ specified. For example, such pages could represent individual branches/offices/cafes of a company that you aggregate on a page that displays all the branches/offices/cafes in one catalog.

## Specifying the URL pattern property

1. If your live site runs on a different domain than the administration instance (e.g. for [MVC sites](https://docs.kentico.com/k12sp/developing-websites/mvc-development-overview.md)), make sure your site's [Presentation URL](https://docs.kentico.com/k12sp/configuring-kentico/managing-sites/setting-domain-names-for-sites.md#setting-the-domain-for-content-only-sites) is specified.
2. Open the **Page types** application.
3. Edit a content-only page type.
4. Fill in the **URL pattern** under which you want the page to be accessible from the administration UI. You can use simple macro expressions for accessing [data of the current page](https://docs.kentico.com/k12sp/custom-development/working-with-pages-in-the-api/page-database-structure.md) in the pattern, such as _{%NodeGUID%}_, _{%DocumentModifiedWhen.Month%}_, or _{%NodeAlias%}._ The _{%NodeAlias%}_ macro retrieves a page alias that allows you to create more SEO-friendly URLs.  For example:

   _/{%DocumentCulture%}/Articles/{%NodeAlias%}_

   resolves into URL '_http://www.example.com/en-US/Articles/On- Roasts'_ for a page in the 'en-US' culture with _Node alias_ 'On Roasts'. 

   > **Note:** **Notes:**
   >
   > - Complex macro expressions including [macro methods](https://docs.kentico.com/k12sp/macro-expressions/reference-macro-methods.md) are not available in the URL pattern.
   > - We do not recommend using query string parameters in URL patterns. The system removes any parameters when generating  _Preview_  URLs for pages based on the pattern.
5. Click **Save**.

Editors can now access the pages of this type from the administration UI using the **Live site** button. They can also insert links to the pages using the [text editor](https://docs.kentico.com/k12sp/managing-website-content/using-the-editor.md), and [work with page builder widgets](https://docs.kentico.com/k12sp/managing-website-content/using-widgets-in-mvc.md) on the **Page** tab.

The system may add a parameter to the resulting URL when displaying pages. For example, the _viewmode_ parameter is added to the URL when you open a page on live site via the administration UI. The resulting URL may then look like this:

_http://www.example.com/en-US/Articles/On- Roasts?viewmode=0_

## Adding support for preview mode

When developing an application that handles the presentation of content-only pages (for example when using the [MVC development model](https://docs.kentico.com/k12sp/developing-websites/mvc-development-overview.md)), you need to manually enable the preview feature and ensure that the preview mode displays the latest versions of pages. For more information, see [Adding preview mode support](https://docs.kentico.com/k12sp/developing-websites/retrieving-content-in-mvc-applications/adding-preview-mode-support.md).

After you set the URL pattern for your content-only page types and enable the preview feature, the system can automatically generate preview URLs for the given pages. You can use the preview mode in two ways within the **Pages** application:

- Switch to **Preview** mode using the main view mode selector.
- Generate preview links for pages in **Properties -> General -> Preview URL**, which you can then send to other users. See: [Sending links to unpublished pages](https://docs.kentico.com/k12sp/managing-website-content/working-with-pages/sending-links-to-unpublished-pages.md)

> **Note:** **Note**: Preview mode is not supported if you are using content-only page types on a Portal Engine site together with standard pages. In this scenario, you can instead use the preview of the pages that load and display the given content.
