# Dynamic Configuration

> For AI agents: a documentation index is available at [/docs/llms.txt](/docs/llms.txt). Append `.md` to any page URL for markdown, or send `Accept: text/markdown`.

Some Amplitude SDK versions (iOS 5.3.0+, Android 2.28.0+, JavaScript 8.9.0+, React Native, Unity, and Flutter) let you set your apps to use dynamic configuration.

Dynamic configuration finds the best Amplitude server URL based on the location of your app users.

## Considerations

- If you have your own proxy server and use the `setServerUrl` API, don't use dynamic configuration.
- If you have users in Mainland China, Amplitude recommends that you use dynamic configuration.
- This feature is off by default. Enable it explicitly to use it.

## Use cases

### Region-based

Send users from different regions to the server for their region.

![Dynamic configuration chart](https://amplitude.com/docs/images/dynamic-config-1.png)

### Dynamically adjust server URLs

If a server URL becomes unreachable, Amplitude can change the address on the dynamic configuration server.

Dynamic configuration makes the ingestion endpoint dynamic, so you don't need to release a new version of your app.

![Dynamic configuration chart](https://amplitude.com/docs/images/dynamic-config-2-1715106682.png)

## Usage

Enable the `useDynamicConfig` flag.

#### iOS

```objc
[Amplitude instance].useDynamicConfig = YES;
```

#### Android

```java
AmplitudeClient.getInstance().setUseDynamicConfig(true);
```

#### Flutter

```dart
Amplitude.getInstance().setUseDynamicConfig(true);
```

#### JavaScript

```js
amplitude.getInstance().init(euApiKey, null, {
    useDynamicConfig: true,
});
```

#### React Native

```ts
Amplitude.getInstance().setUseDynamicConfig(true);
```

#### Unity

```c#
amplitude.setUseDynamicConfig(true);
```
