# Custom Tracking Domains

:::info
Custom tracking domains are available on **Pro plans** only. [Upgrade your plan](https://dash.lettermint.co/team/billing) to enable this feature.
:::

## Overview

By default, tracked links in your emails use Lettermint's shared tracking domain (`p{sid}.t.ltrmnt.com`, where `{sid}` is your project's short ID). Custom tracking domains let you replace this with your own branded subdomain, such as `track.yourcompany.com`.

**Benefits:**
- **Brand consistency** — Recipients see your domain, not a third-party link
- **Increased trust** — Branded links look more professional and reduce suspicion
- **Better deliverability** — Some spam filters view branded domains more favorably than generic tracking domains

## Requirements

Before setting up a custom tracking domain:

- **Pro plan** — Custom tracking domains require an active Pro subscription
- **Subdomain access** — You need DNS management access to add CNAME records
- **Subdomain format** — Must be a subdomain (e.g., `track.example.com`), not a root domain

## Setup Guide

### Step 1: Choose Your Subdomain

Select a subdomain for tracking. Common choices:

| Subdomain | Full Domain |
|-----------|-------------|
| `track` | `track.yourcompany.com` |
| `click` | `click.yourcompany.com` |
| `links` | `links.yourcompany.com` |
| `t` | `t.yourcompany.com` |

### Step 2: Add DNS Record

Add a CNAME record pointing your subdomain to Lettermint's custom tracking endpoint:

| Record Type | Host | Target |
|-------------|------|--------|
| CNAME | `track` (or your chosen subdomain) | `custom.ltrmnt.com` |

:::note
DNS propagation can take up to 48 hours, though most changes take effect within minutes to a few hours.
:::

### Step 3: Configure in Dashboard

1. Navigate to your **Project** in the dashboard
2. Go to **Settings**
3. Under **Custom Tracking Domain**, enter your full subdomain (e.g., `track.yourcompany.com`)
4. Click **Save**

Lettermint will automatically queue a DNS verification check.

### Step 4: Verify Domain

Verification happens automatically after you save. You can also manually trigger verification:

1. Go to **Project Settings**
2. Under **Custom Tracking Domain**, click **Verify Now**

Once verified, your custom domain becomes active immediately for all routes with tracking enabled.

## Verification States

| Status | Description |
|--------|-------------|
| **Pending** | CNAME record not yet detected — waiting for DNS propagation |
| **Verified** | Domain is active and serving tracking links |
| **Failed** | CNAME record missing or pointing to wrong target |

:::warning
If verification fails, double-check that your CNAME record points to `custom.ltrmnt.com` exactly. Common issues include trailing dots, incorrect subdomains, or CAA records blocking certificate issuance.
:::

## How It Works

Once your custom domain is verified:

1. **Link rewriting** — New emails use your domain instead of `p{sid}.t.ltrmnt.com`
2. **SSL provisioning** — Lettermint automatically provisions an SSL certificate for your domain
3. **Re-verification** — DNS is re-checked every 24 hours to ensure continued validity
4. **Route integration** — All routes with click tracking enabled use your custom domain

### Example

With custom domain `track.yourcompany.com`, tracked links transform:

**Before (default):**
```html
<a href="https://p123.t.ltrmnt.com/c/{token}">View Product</a>
```

**After (custom domain):**
```html
<a href="https://track.yourcompany.com/c/{token}">View Product</a>
```

## DNS Troubleshooting

### CNAME Not Detected

If verification remains pending:

1. **Check propagation** — Use a tool like [dnschecker.org](https://dnschecker.org) to verify your CNAME is visible globally
2. **Verify target** — Ensure the CNAME points to `custom.ltrmnt.com` (not `custom.ltrmnt.com.` with trailing dot)
3. **Wait** — DNS changes can take up to 48 hours to propagate fully
4. **Re-verify** — Click **Verify Now** after confirming DNS is correct

### Conflicting Records

CNAME records cannot coexist with other record types (A, AAAA, MX, TXT) on the same subdomain. If you have existing records on your tracking subdomain, remove them before adding the CNAME.

### CAA Records

If your domain has [CAA records](https://en.wikipedia.org/wiki/DNS_Certification_Authority_Authorization), ensure they permit certificate issuance. Lettermint uses Let's Encrypt for SSL certificates, so your CAA records should include:

```
yourcompany.com. CAA 0 issue "letsencrypt.org"
```

Or remove CAA restrictions to allow any certificate authority.

## Limitations

- **One domain per project** — Each project can have one custom tracking domain
- **Subdomain only** — Root domains cannot be used (must be `track.example.com`, not `example.com`)
- **New emails only** — Existing emails sent before configuration continue using the old tracking domain
- **Propagation delay** — DNS changes require verification before the domain becomes active

## FAQ

<details>
<summary>Can I use the same custom domain across multiple projects?</summary>

No, each custom tracking domain can only be assigned to one project. This ensures unique tracking tokens and prevents conflicts between projects.

</details>

<details>
<summary>What happens if my DNS record is removed?</summary>

Lettermint re-verifies DNS every 24 hours. If verification fails, your custom domain status changes to **Failed** and new emails fall back to the default tracking domain (`p{sid}.t.ltrmnt.com`). Existing tracked links continue to work as long as the DNS record pointed to Lettermint at the time of the click.

</details>

<details>
<summary>Do I need to configure SSL certificates?</summary>

No. Lettermint automatically provisions and renews SSL certificates for your custom domain using on-demand TLS. Certificates are issued within seconds of the first request to your domain.

</details>

<details>
<summary>Can I switch back to the default tracking domain?</summary>

Yes. Remove the custom domain from your project settings, and new emails will use the default tracking domain. Previously sent emails continue using whichever domain was active when they were sent.

</details>

## Next Steps

<CardGroup cols={2}>
  <Card title="Click Tracking" icon="arrow-pointer" href="/platform/emails/tracking/click-tracking">
    Learn how click tracking works and configure it for your routes
  </Card>
  <Card title="Open Tracking" icon="envelope-open" href="/platform/emails/tracking/open-tracking">
    Combine with open tracking for complete engagement analytics
  </Card>
</CardGroup>
