---
title: 'Domain Configuration'
description: 'Learn how to setup domains using the TwicPics dashboard.'
category: 'essentials'
position: 1
---

# Domain Configuration

<docs-page-description :description="description"></docs-page-description>

A domain is a collection of paths. Domain paths map two URLs:

- **An output URL** — where optimized assets will be served from
- **A source URL** — the storage where the media will be retrieved from

Taking the example of the `subdomain.twic.pics` domain:

- If `/` points to `https://media.company.com/`
- Then `https://subdomain.twic.pics/image.png` will point to `https://media.company.com/image.png`.

## TwicPics domains

In each workspace domain section, you can configure a `subdomain` under the TwicPics domain:

<illustration width="2092" height="928" src="docs/createTwicPicsDomain-002.png" caption="Create a TwicPics domain"></illustration>

You can choose any `subdomain` you like, pending availability.

Example:  `https://mycompany.twic.pics`

## Custom domains

You can set up **custom domains of your own** (using custom CNAME).

Example: `https://assets-subdomain.yourcompany.com`

### Requirements

Connecting your domain requires adding **two CNAME records**.

- Use a domain that you own
- Use a sub-domain like `media.mydomain.com`
- Root domains, e.g. `mydomain.com` (without the ***www***), are not supported

<doc-alert type="info">
  Custom domains are available for Business and Enterprise customers.
</doc-alert>

### Create a custom domain

In the workspace domain section, open the dropdown menu "create domain" and click on **Create Custom domain** :

<illustration width="2442" height="871" src="docs/createCustomDomain-001.png" caption="Create a custom domain"></illustration>

<doc-alert type="warning"> Validation and generation of each CNAME can take several minutes.</doc-alert>

<doc-alert type="info">Using multiple environments? Check our [Multiple environments pattern](/docs/guides/multiple-environments).</doc-alert>
