---
title: URL format and configuration
---

> 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).

## Defining URL extensions

Page URLs can use various types of extensions. By default, all URLs end with _.aspx_, for example: _http://www.example.com/products/kentico-cms.aspx_

You can also use **custom extensions**, such as _.htm_, _.html_ or any other sequence of characters, or **URLs without extensions**, such as _http://www.example.com/products/kentico-cms_. In this case, you need to configure the system as described in [Extensionless and custom URLs](https://docs.kentico.com/k12sp/configuring-kentico/configuring-page-urls/extensionless-and-custom-urls.md).

## Forbidden URL characters

Certain characters have special meanings in URLs, so they cannot be used in values that determine the path to pages (i.e. page aliases and URL paths). By default, the following characters are forbidden:

```text

\/:*?"<>|&%.'#[]+=„" and the space character
```

To specify additional forbidden characters:

1. Open the **Settings** application.
2. Select the **URLs and SEO** category.
3. Type the characters into the **Forbidden URL characters** setting (without any separator).
4. Click **Save**.

Alternatively, you can enter a [regular expression](http://en.wikipedia.org/wiki/Regular_expression) into the **Allowed URL characters** setting to precisely specify which characters are allowed in URLs.

> **Note:** **Note**
>
> The default characters listed above are always forbidden unless you override the **CMSForbiddenURLValues** key in the _/configuration/appSettings_ section of your application's web.config file. For example:
>
> ```html
>
> <add key="CMSForbiddenURLValues" value="$\/:?&quot;&lt;&gt;|&amp;%.&apos;#[] =" />
>
> ```
>
> You can either use the key to allow some of the default forbidden characters, or add new ones. It is _**strongly recommended to keep the default characters forbidden**_ — entering the characters into URL paths may prevent certain types of URLs from working correctly.

The system automatically replaces or removes forbidden characters. You can specify the character that is used to replace forbidden characters through the **Forbidden characters replacement** setting in **Settings -> URLs and SEO**. By default, forbidden characters located at the beginning or end of the path are removed completely and consecutive forbidden characters are only replaced by a single character. If you wish to have each forbidden character replaced individually, add the following key to your web.config:

```html

<add key="CMSLimitUrlReplacements" value="false" />

```

This preference may also be set specifically for the **Page URL Path** property of pages (and no other URLs) via the key below:

```html

<add key="CMSUseLimitReplacementsForUrlPath" value="false" />

```

> **Tip:** **Advanced character replacement customization**
>
> You can change the character replacement behavior to deal with specific scenarios, such as handling non-ASCII character sets or assigning unique replacement strings for specific characters.
>
> This can be achieved by customizing how the system converts URLs into a safe format. See [Custom handling of URL path values](https://docs.kentico.com/k12sp/custom-development/handling-global-events/custom-handling-of-url-path-values.md) for more information.

## Using URL Prefixes

If you need to add a prefix to all URLs on a specific site (e.g. for search engine optimization), you can specify it in **Settings -> URLs and SEO -> Default Url path prefix**. The URLs use the following format: _//_

For example: _http://www.example.com/myprefix/products/kentico-cms.aspx_

## Using language prefixes for URLs

To add a different URL prefix for every page culture version, type the prefix into the **Settings -> URLs and SEO -> Use language prefix for URLs** setting. If you have both language prefixes and standard URL path prefixes enabled, the standard URL prefix always precedes the language prefix in the URL. Refer to [Configuring URLs for multilingual websites](https://docs.kentico.com/k12sp/multilingual-websites/setting-up-multilingual-websites/configuring-urls-for-multilingual-websites.md) for more details.

## Reference - URL settings

The above configuration tasks can be performed via the **Settings** application in the **URLs and SEO** category. The following table shows an overview of the available settings:

| URL format                               |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Forbidden URL characters                 | List of additional characters that cannot be used in URLs (page aliases and URL paths).<br>The following characters are forbidden by default: \\/:\*?"\|&%.'#\[]+=„“ and the space character.                                                                                                                                                                                                                                                                                                          |
| Forbidden characters replacement         | Specifies the character that the system uses as a replacement for forbidden characters in URLs.                                                                                                                                                                                                                                                                                                                                                                                                        |
| Allowed URL characters                   | Determines which characters are usable in URLs by means of a regular expression. Any characters not specified are forbidden. If empty, only the characters specified by the **Forbidden URL characters** setting are prohibited.<br>When allowing special characters in the regular expression, they must be preceded by a backslash (\\) as an escape character.<br>**Example**: Entering `a-zA-Z0-9\^` as the value only allows alphanumeric characters and the caret symbol (^) to be used in URLs. |
| Friendly URL extension                   | Specifies the extensions that the system adds to page URLs.<br>Extensions must be preceded by the period character.<br>You can add multiple extensions separated by semicolons (;).<br>The first extension is used as the default option when generating links and page URLs. Additional extensions are supported in URLs when accessing pages.<br>To allow extensionless URLs, enter a semicolon without any extension.<br>Sample value: ._aspx;.html;.htm;;_                                         |
| Files friendly URL extension             | Specifies the extension that the system adds to file URLs.<br>**Example**: _getfile//myimage.aspx_<br>If **empty**, file URLs either have no extension or use the given file's default extension.<br>If you set this setting to an empty or custom value, you need to allow custom URL extensions by adding the _runAllManagedModulesForAllRequests_ attribute to the __ element in the __ section of your project's main _web.config_ file.                                                           |
| Excluded URLs                            | Specifies a list of URLs that are excluded from the URL rewriting engine. See [Excluding URLs from the rewriting engine](https://docs.kentico.com/k12sp/configuring-kentico/configuring-page-urls.md#excluding-urls-from-the-rewriting-engine) for more information.                                                                                                                                                                                                                                   |
| Page URLs                                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| Default URL path prefix                  | Defines a default URL path prefix used for all URLs of content pages. Internally, this prefix is rewritten to the _urlpathprefix_ query string parameter.                                                                                                                                                                                                                                                                                                                                              |
| Use name path for URL path               | If checked, the system automatically copies page name paths to the URL path.                                                                                                                                                                                                                                                                                                                                                                                                                           |
| Use permanent URLs                       | If enabled, URLs of pages and page attachments are generated in permanent format. If disabled, friendly URLs are used. Learn more in [Linking pages and files](https://docs.kentico.com/k12sp/configuring-kentico/configuring-page-urls/linking-pages-and-files.md).                                                                                                                                                                                                                                   |
| Remember original URLs when moving pages | Indicates if the system creates new page aliases when a user sets a new page URL path or extension for a page.                                                                                                                                                                                                                                                                                                                                                                                         |
| Automatically update page alias          | If enabled, the alias of pages is automatically updated to match any changes in the name of the given page in the default culture. When enabled, the page alias property cannot be edited manually.                                                                                                                                                                                                                                                                                                    |

Other settings (related to SEO) may also affect the format of URLs. To learn about these, refer to the [Search engine optimization](https://docs.kentico.com/k12sp/configuring-kentico/search-engine-optimization.md) chapter.
