> For the complete documentation index, see [llms.txt](https://developers.didomi.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.didomi.io/api-and-platform/domains/serve-didomi-assets-from-your-domain-mobile.md).

# Serve Didomi assets from your domain (mobile)

By default, Didomi relies on the `privacy-center.org` domain when serving assets- whether that is to load a consent notice, a preference center, or a privacy request widget, Didomi's SDKs and integrations, including their assets (JavaScript files, images, etc.) and API requests.

In this article, we will cover how to configure your integration so that these assets are served from your organization's own domain instead when utilizing Didomi mobile SDKs.

* [Configure custom domain](#configure-custom-domain)
* [Configure the mobile SDK](#configure-the-mobile-sdk)

***

### Configure custom domain

Didomi offers two options when configuring the [custom domain](/api-and-platform/domains.md) that will be used to serve Didomi assets.

<table><thead><tr><th width="216">Option</th><th>Description</th></tr></thead><tbody><tr><td><a href="/pages/ubsuzBbyyEUzFR1oVMHu">Domain delegation</a></td><td>The SDK will load Didomi assets via your domain but all the infrastructure will be handled by Didomi.</td></tr><tr><td><a href="/pages/NTUTjqEhagEDcAbO4QfC">Self-hosting via reverse proxy</a></td><td>The SDK will load assets from your domain and infrastructure.<br>This ensures that requests are processed and cached on your own servers while allowing you to use the latest version of the<br>SDK and its consent notice configuration.</td></tr></tbody></table>

### Configure the mobile SDK

Once your organization's custom domain is set up, pass `sdkPath` and `apiPath` to `DidomiInitializeParameters` when initializing the SDK:

* `sdkPath`: overrides the base URL for all static file requests (consent notice config, GVL, IAB vendor list). Defaults to the Didomi CDN.
* `apiPath`: overrides the base URL for all API requests (Consents API, cross-device sync, API\
  events). Defaults to the Didomi API.

{% hint style="info" %}
Both values must use HTTPS. Non-HTTPS or malformed URLs are ignored and an error is logged.
{% endhint %}

{% tabs %}
{% tab title="Swift" %}
{% code overflow="wrap" %}

```swift
let parameters = DidomiInitializeParameters(
  apiKey: "your-api-key",
  noticeID: "your-notice-id",
  sdkPath: "https://sdk.example.com",
  apiPath: "https://api.example.com"
)
Didomi.shared.initialize(parameters)
```

{% endcode %}
{% endtab %}

{% tab title="Kotlin" %}
{% code overflow="wrap" %}

```kotlin
val parameters = DidomiInitializeParameters(
  apiKey = "your-api-key",
  noticeId = "your-notice-id",
  sdkPath = "https://sdk.example.com",
  apiPath = "https://api.example.com"
)
Didomi.getInstance().initialize(application, parameters)
```

{% endcode %}
{% endtab %}

{% tab title="React Native" %}
{% code overflow="wrap" %}

```typescript
Didomi.initialize({
  apiKey: 'YOUR_API_KEY',
  noticeId: 'YOUR_NOTICE_ID',
  sdkPath: 'https://sdk.example.com',
  apiPath: 'https://api.example.com',
});
```

{% endcode %}
{% endtab %}

{% tab title="Flutter" %}
{% code overflow="wrap" %}

```dart
DidomiSdk.initialize(DidomiInitializeParameters(
  apiKey: 'YOUR_API_KEY',
  noticeId: 'YOUR_NOTICE_ID',
  sdkPath: 'https://sdk.example.com',
  apiPath: 'https://api.example.com',
));
```

{% endcode %}
{% endtab %}

{% tab title="Unity" %}
{% code overflow="wrap" %}

```csharp
Didomi.GetInstance().Initialize(new DidomiInitializeParameters(
    apiKey: "YOUR_API_KEY",
    noticeId: "YOUR_NOTICE_ID",
    sdkPath: "https://sdk.example.com",
    apiPath: "https://api.example.com"
));
```

{% endcode %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers.didomi.io/api-and-platform/domains/serve-didomi-assets-from-your-domain-mobile.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
