---
title: Configuring settings for sites
related:
  - https://docs.kentico.com/13/custom-development/creating-custom-modules/adding-custom-website-settings.md
  - https://docs.kentico.com/13/configuring-xperience/reference-web-config-application-keys.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).

You can configure settings for sites in the **Settings** application.

There are two basic types of settings:

- **Global** – apply to all sites in the system, unless individual sites override the values.
- **Site-specific** – apply to the selected **Site**. The site settings load the global values unless you disable the _Inherit from global settings_ option for individual settings and enter different values.

> **Note:** **Note**: Some settings are only available as global settings.

## Accessing the settings application

Only two types of users can configure settings in the **Settings** application:

- Users with the Global administrator [privilege level](https://docs.kentico.com/13/managing-users/user-management.md)
- Users who belong to [roles](https://docs.kentico.com/13/managing-users/role-management.md) with the **Configure settings** [permission](https://docs.kentico.com/13/managing-users/configuring-permissions.md) for the **CMS** module

Users without the Global administrator privilege level can only configure setting values for the current site (global-only settings are not available), and cannot access certain security-sensitive settings.

## Searching for settings

There is a very large number of settings in Xperience. To find a particular setting among all the categories:

1. In the **Settings** application, select the root of the settings tree (**Settings**).
2. Type the name of the setting or related words into the field at the top of the page.
3. Click **Search**.

   - If you check **Search in description**, the search also finds settings that have the given text in their description (tooltip).

The page displays all settings that contain the search text in their name. You can edit the values of the settings directly.

![Searching for settings](https://docs.kentico.com/docsassets/13/configuring-settings-for-sites/Searching_Settings.png "Searching for settings")

## Resetting settings

Users with the Global administrator [privilege level](https://docs.kentico.com/13/managing-users/user-management.md) can reset settings to their default values:

1. Select a category in the **Settings** application.
2. Choose _(global)_ in the **Site** selector above the settings tree.
3. Click **Reset these settings to default**.
4. Click **OK** in the confirmation dialog.
5. Click **Save**.

All settings in the given category now have the default value defined in the **Default value** property of the corresponding keys.

## Exporting the setting values

Users with the Global administrator [privilege level](https://docs.kentico.com/13/managing-users/user-management.md) can export the values of all settings in the selected category to a text file. Click **Export these settings** in the header of the setting page. Exporting settings can be useful, for example when consulting issues with Kentico support.

## Loading the values of settings in code

The Xperience API allows you to check the values of settings in your code. You can load values of both the default and [custom](https://docs.kentico.com/13/custom-development/creating-custom-modules/adding-custom-website-settings.md) settings.

To load the values of settings, use `ISettingsService` (we recommend using [dependency injection](https://docs.kentico.com/13/developing-websites/initializing-xperience-services-with-dependency-injection.md) to instantiate system service classes). The service exposes an indexer that you can use to access the values of individual setting keys. Settings are identified by the following formats:

- **SettingKeyCodeName** – for global settings
- **SiteCodeName.SettingKeyCodeName** – for site-specific settings (to get the code name of the current site, use `ISiteService.CurrentSite.SiteName`)

```csharp title="Example"

using CMS.Core;

...

// Contains an instance of the settings service (e.g., obtained using dependency injection)
private readonly ISettingsService settingsService;

// Gets the value of the 'CMSHomePagePath' setting for the 'SiteCodeName' site
string value = settingsService["SiteCodeName.CMSHomePagePath"];

```

The service always returns `string` values. If you need to cast the setting value to a different type, use `IConversionService`.

```csharp title="Example"

using CMS.Core;

...

// Contains an instance of the conversion service (e.g., obtained using dependency injection)
private readonly IConversionService conversionService;

// Gets the maximum allowed number of events stored by the event log
int eventLogSize = conversionService.GetInteger(settingsService["SiteCodeName.CMSLogSize"], -1);

// Checks if Continuous Integration is enabled
bool continuousIntegrationEnabled = conversionService.GetBoolean(settingsService["CMSEnableCI"], false);

```

## Getting setting values in macro expressions

> **Note:** **Note**: Only users with the Global administrator [privilege level](https://docs.kentico.com/13/managing-users/user-management.md) can create macros that load the values of settings. The _Configure settings_ [permission](https://docs.kentico.com/13/managing-users/configuring-permissions.md) for the _CMS_ module is not sufficient for this purpose.

[Macro expressions](https://docs.kentico.com/13/macro-expressions.md) allow you to:

- Dynamically insert the values of settings into most fields in the Xperience administration interface
- Work with settings in macro conditions or other expressions with advanced logic

You can load values of both the default and custom settings.

Use the following expression to get setting values inside macros: _**Settings.**_

For example:

```text

{% Settings.CMSStoreFilesInFileSystem %}
```

The macro returns the setting's value for the currently running site (or the global value for global-only settings). If you need to access the global value of a setting, you can use the following macro expression: _GlobalObjects.SettingsKeys..KeyValue_
