# Domain and DNS

Source: https://docs.qvoice.net/whitelabel/domain-and-dns/

The domain a white label partner's customers use to reach the branded service, and the DNS records
it needs. Back to [Get Started](https://docs.qvoice.net/whitelabel/).

## Fully qualified domain

Allocate a **full domain** or a **subdomain** for the branded UCaaS/CCaaS service. You can buy a
domain from any registrar, for example GoDaddy.

| Style | Example | Notes |
| --- | --- | --- |
| Apex domain | `clouduc.com` | The whole zone is used for UCaaS/CCaaS |
| Subdomain | `uc.clouduc.com` | `uc` under an existing parent domain |

On this page, `<domain>` means the name you chose (for example `clouduc.com` or `uc.clouduc.com`).

## Who manages DNS

**QVOICE Platform manages it (recommended).** QVOICE Platform uses AWS Route 53 for DNS
records and failover, and the QVOICE Platform team can do all the DNS configuration for you:

1. Create an AWS Route 53 account and give access to `info@fonouc.com`.
2. Point the domain's NS records to the Route 53 name servers.

**Your team manages it.** Create the records below at your registrar or DNS provider.

## Required DNS records

| Name | Type | Value | Purpose |
| --- | --- | --- | --- |
| `_acme-challenge.<domain>` | CNAME | `_acme-challenge.qvoice.net` | Automates wildcard TLS certificate validation (ACME) |
| `*.<domain>` | CNAME | `<domain>` | Wildcard: routes every subdomain to the service domain |
| `uc01.<domain>` | A | Public IP of server 1 | First cluster node |
| `uc02.<domain>` | A | Public IP of server 2 | Second cluster node |
| `uc03.<domain>` | A | Public IP of server 3 | Third cluster node |

Example when `<domain>` is `uc.clouduc.com`:

```
_acme-challenge.uc.clouduc.com   CNAME   _acme-challenge.qvoice.net
*.uc.clouduc.com                CNAME   uc.clouduc.com
uc01.uc.clouduc.com             A       <public-ip-server-1>
uc02.uc.clouduc.com             A       <public-ip-server-2>
uc03.uc.clouduc.com             A       <public-ip-server-3>
```

Example when `<domain>` is `clouduc.com`:

```
_acme-challenge.clouduc.com     CNAME   _acme-challenge.qvoice.net
*.clouduc.com                   CNAME   clouduc.com
uc01.clouduc.com                A       <public-ip-server-1>
uc02.clouduc.com                A       <public-ip-server-2>
uc03.clouduc.com                A       <public-ip-server-3>
```

**ACME challenge:**

The `_acme-challenge` CNAME delegates certificate validation to QVOICE Platform, so the
wildcard `*.<domain>` TLS certificate renews without manual TXT updates at your registrar.
Without it, buy a wildcard certificate for `*.<domain>` (for example from sslmate.com).

**Additional records:**

The apex `<domain>` may also need A records with failover for the main customer URL, plus MX
and SRV records. See [DNS zone example for a single cluster](https://docs.qvoice.net/whitelabel/domain-and-dns/#dns-zone-example-for-a-single-cluster).

## Naming clusters

**Single cluster**: one cluster domain, for example `cl1.customer-domain.com`.

**Multiple clusters**: the records of every cluster go under one domain, with a label per cluster
that names its location: `cl1` and `cl2`, `cl1-east` and `cl-west`, or `dc-nyc` and `dc-chicago`,
whatever matches your datacenters.

- Cluster 1 domain: `cl1.customer-domain.com`
- Cluster 2 domain: `cl2.customer-domain.com`

## DNS zone example for a single cluster

```
## Main service domain used by customers, protected by AWS Route 53 health checks and A record failover
customer-domain.com
    A   IP of server 1   failover primary,   TTL 30 s
    A   IP of server 2   failover secondary, TTL 30 s
    AWS health check on the IPs of server 1 and server 2, TCP port 5060

## A records pointing to each server
uc01.customer-domain.com   A   IP of server 1, TTL 300
uc02.customer-domain.com   A   IP of server 2, TTL 300
uc03.customer-domain.com   A   IP of server 3, TTL 300

## Wildcard mapping every other subdomain to the protected main service domain
*.customer-domain.com   CNAME   customer-domain.com, TTL 300

## MX records, used for email to fax
MX   priority 1   uc01.customer-domain.com
MX   priority 2   uc02.customer-domain.com
MX   priority 3   uc03.customer-domain.com

## SRV records, used for SIP DNS SRV resolution and SIP redundancy
_sip._udp.customer-domain.com   10   3   5060   uc01.customer-domain.com
_sip._udp.customer-domain.com   20   3   5060   uc02.customer-domain.com

## Multi A record, for internal use
sip-rr.customer-domain.com   A   IPs of all 3 servers
```

The web GUI is reached at `www.<domain>`, which the wildcard CNAME already covers.
