Use your own domain

A default URL is assigned to your widget, for example:

https://organization.preference-center.org/

We recommend using your own domain name instead, such as https://privacy.company-name.com

Your domain will be managed by Didomi and you will simply need to create a DNS record in your DNS provider, then create and publish a Widget with your custom domain.

Keep reading to learn how to do so.

Step 1 - Create the DNS record for your domain

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

Parameter name

Value

Notes

Name

Your custom domain (privacy.company-name.com 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.

Type

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)

300

Value

ns1.preference-center.org ns2.preference-center.org ns3.preference-center.org ns4.preference-center.org

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

If you need help with this step, feel free to reach out to support@didomi.io and we'll be happy to help.

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 privacy.company.com and already have a CloudFront distribution with either privacy.company.com or *.company.com as CNAMEs, we will not be able to create the custom domain for you and the step 2 above does not apply.

If you are in this situation, please read the instructions below and contact us if you need help.

Step 2 - Create a Widget with a custom domain

To create a Widget with a custom domain, send a POST request on /widgets.

POST https://api.didomi.io/widgets?organization_id=YOUR_ORG_ID

{
  "domain": "custom",
  /**
   * custom_domain_id corresponds to your custom domain
   * ex: preferences.didomi.io
   */  
  "custom_domain_id": "String",
   /**
   * name and layout_shapes are required values for creation,
   * they are not related to your custom domain configuration
   */
  "name": "String",
  "layout_shape": "smoothed"
}

Once you have created the DNS record in your DNS provider (step 1) and created the Widget with your custom domain (step 2), you can publish your Widget.

Step 3 - Publish your Widget with a custom domain

Before we can start serving your Preference Center on your custom domain, we need to set up our DNS servers to recognize it and this setup is triggered at deployment time (it will take approximately 10 min).

To deploy a Widget, send a POST request on /widgets/deployments.

POST https://api.didomi.io/widgets/deployments?organization_id=YOUR_ORG_ID

{
  "widget_id": "WIDGET_ID"
}

If you struggle with configuring your custom domain, send an email to support@didomi.io or to the person you have been in touch with at Didomi to let us know what custom domain you will be using and that the setup is done on your side.

Last updated