> 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/widgets/privacy-widgets/deploy-a-widget/use-your-own-subdomain.md).

# Use a Didomi managed domain

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

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

We recommend using a custom subdomain, such as [`https://company-name.preference-center.org`](https://company-name.preference-center.org) even though we favor usage of your [own domain name](/api-and-platform/widgets/privacy-widgets/deploy-a-widget/use-your-own-domain.md).

## Step 1 - Create a Widget with a subdomain

To create a Widget with your own subdomain, send a **POST** request on `/widgets`.

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

{
  "domain": "sub",
  /**
   * subdomain_id corresponds to your subdomain and domain name preference-center.org
   * ex: didomi.preference-center.org
   */  
  "subdomain_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"
}

```

## Step 2 - Publish a widget with your subdomain

Before we can start serving your Preference Center with your own subdomain, we need to create the subdomain in our system. **This setup is** **triggered at deployment time**.

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

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

{
  "widget_id": "WIDGET_ID"
}
```

If you struggle with configuring your subdomain, send an email to <support@didomi.io> or to the person you have been in touch with at Didomi to let us know what subdomain you will be using.

If you have configured a [custom domain](/api-and-platform/widgets/privacy-widgets/deploy-a-widget/use-your-own-domain.md) and want to use a subdomain again, send an email to <support@didomi.io>.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developers.didomi.io/api-and-platform/widgets/privacy-widgets/deploy-a-widget/use-your-own-subdomain.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
