---
title: URL segments and IDN
slug: cms-13/docs/url-segments-and-idn
docTags: 
createdAt: 2026-07-30T20:22:06.571Z
---

URL segments control how CMS generates URL-safe strings from content names and simple addresses. By default, Optimizely restricts characters to those allowed by [RFC 1738](http://www.faqs.org/rfcs/rfc1738.html): alphabetic, numeric, `-`, `_`, `~`, `.`, and `$`.

Define a custom character set by updating `UrlSegmentOptions` in the dependency injection container. When the character set includes characters outside RFC 1738, set `UrlSegmentOptions.SupportIriCharacters` to `true` to enable IRI encoding.

The following example configures a character set that allows Unicode letter characters:

```csharp
using EPiServer.ServiceLocation;
using EPiServer.Framework.Initialization;
using EPiServer.Framework;
using EPiServer.Web;

namespace EPiServerSite {
  [ModuleDependency(typeof (EPiServer.Web.InitializationModule))]
  public class IRIConfigurationModule: IConfigurableModule {
    public void ConfigureContainer(ServiceConfigurationContext context) {
      context.Services.Configure<UrlSegmentOptions>(o => {
        o.SupportIriCharacters = true;
        o.ValidCharacters = @ "\p{L}0-9\-_~\.\$";
      });
    }
    public void Initialize(InitializationEngine context) {}
    public void Uninitialize(InitializationEngine context) {}
  }
}
```

`UrlSegmentOptions` exposes a `CharacterMap` property for mapping unsupported characters. For example, map `'ö'` to `'o'`.

## Internationalized domain names (IDN)

Internationalized domain names (IDN) use Punycode format to represent Unicode characters with ASCII characters. Register internationalized domain names in Punycode format. For background, go to [IDN and IRI](https://www.w3.org/International/articles/idn-and-iri/).
