Domain delegation

You can setup domain delegation to ensure that the Web SDK is served from your own domains. When configured, all HTTP requests used by the Didomi SDK are routed through your own domain to ensure that Didomi does not appear as a third-party on your websites.

Configure the domain

This domain configuration is the same used for sharing consents between domains.

If you have already delegated a domain to Didomi, you can use it for serving the Web SDK and API requests with no additional configuration on the domain itself.

You can skip to configuring the SDK.

Choose a sub-domain

Pick a sub-domain that will be used for serving the Didomi Web SDK and API requests. We recommend picking a sub-domain of your biggest website.

Delegate your sub-domain to Didomi

Create a DNS record with your DNS provider or registrar that manages your domain, and use the following configuration parameters:

Parameter name




Your custom domain ( or similar)

You will be creating a DNS record for a specific sub-domain of your domain name (like privacy., for instance) and not delegating the DNS management of your whole domain.


NS (Name server)

The type NS allows us to generate SSL certificates for the sub-domain and serve your privacy center with SSL/HTTPS.

TTL (seconds)



Didomi's name servers that will host the DNS records for your custom domain

If you are using CloudFront from Amazon Web Services

To support your custom domain, we will create a dedicated CloudFront distribution with your custom domain as a CNAME. Because of AWS restrictions, it is not possible for us to create that distribution if you already have a distribution in your account with either the exact same CNAME or a matching wildcard CNAME.

For instance, if you have chosen to use the custom domain and already have a CloudFront distribution with either or * as CNAMEs, we will not be able to host the custom domain for you.

Contact our support team

Before you can start using your custom domain, we need to setup our DNS servers to recognize it. Send an email to [email protected] to let us know what custom domain you will be using and that the setup is done on your side.

Do not configure the Didomi SDK to use your custom domain until we have confirmed that the setup is done on our side.

Configure the SDK

Once your sub-domain and proxy are setup, the SDK needs to be configured to use your domain for three types of requests:

  • The initial loader.js request that is sent directly from the Embed code obtained from the Didomi Console.

  • The chunks loaded by the SDK itself.

  • Requests sent to the API by the SDK.

The following steps explain how to configure the SDK.

Step 1 - Update the Embed code

Update the Embed code from the Didomi Console to replace with This ensures that the first request to load the Didomi SDK (the loader.js file) uses your sub-domain.

Step 2 - Update the SDK configuration

For the other JavaScript files loaded by the SDK, you must configure the paths to use by setting the sdkPath and apiPath properties in the window.didomiConfig object:

<script type="text/javascript">
window.didomiConfig = {
sdkPath: '',
apiPath: '',

The sdkPath property must start with http://, https://, or //. It must also end with a final /. The apiPath property must start with http://, https://, or //.

For security reasons and to avoid injecting JavaScript on your website from the Didomi Console, the sdkPath and apiPath properties cannot be set via Custom JSON in the Didomi Console. They must be set directly on your website via the window.didomiConfig object.