---
title: "Custom Tracking Domains"
slug: introducing-custom-tracking-domain
description: "Use your own domain for tracking links to improve deliverability and brand consistency."
created_at: "2026-04-16"
updated_at: "2026-04-16"
image: "https://cdn.resend.com/posts/custom-link-tracking-cover.jpg"
humans: ["anna-ward", "rehan-van-der-merwe", "mateusz-wos", "cassio-zen"]
category: "product"
featured: true
---

Tracking can give you a clear picture of how your emails are performing.

But email tracking typically relies on shared domains, meaning reputation is shared as well. If others using your domain are not sending emails responsibly, it can impact your deliverability.

Today, we're launching [**custom tracking domains**](/domains), free for all Resend users.

<video
  src="https://cdn.resend.com/posts/introducing-custom-click-tracking.mp4"
  poster="https://cdn.resend.com/posts/custom-link-tracking-poster.jpg"
  controls
  className="extraWidth"
/>

## How it works

To get started, go to [Domains](/domains), and select the **Configure** tab for your domain.

Add the required record to your DNS settings and Resend will automatically route all tracking through your custom domain.

<video
  src="https://cdn.resend.com/posts/custom-link-tracking-configure.mp4"
  autoPlay
  loop
  muted
  playsInline
  className="extraWidth"
/>

Both features are configured at the domain level, and both are disabled by default.

## Two types of tracking

On Resend, you can enable two different types of tracking:

### 1. Click tracking

When you enable click tracking, Resend sets up a **redirect for each link** in your email. When a recipient clicks, the action is recorded and they are immediately forwarded to the original URL.

<video
  src="https://cdn.resend.com/posts/custom-link-tracking-click-tracking.mp4"
  autoPlay
  loop
  muted
  playsInline
  className="extraWidth"
/>

### 2. Open tracking

When you enable open tracking, Resend **embeds a 1x1 pixel transparent image** in your emails. When a recipient's mail client downloads it, Resend records an open event.

<video
  src="https://cdn.resend.com/posts/custom-link-tracking-open-tracking.mp4"
  autoPlay
  loop
  muted
  playsInline
  className="extraWidth"
/>

## Why a custom domain matters

Inbox providers like to see consistency between your sending domain and the content of your emails.

When tracking links pass through a domain you own, rather than a shared one, inbox providers notice. And that alignment is better for deliverability.

It also means your recipients never see an unfamiliar domain in the links they click.

## Set up custom tracking via the API

Of course, you can also enable custom tracking when creating a domain via the API.

<CodeTabs>

```nodejs
import { Resend } from 'resend';

const resend = new Resend('re_xxxxxxxxx');

const { data, error } = await resend.domains.create({
  name: 'example.com',
  openTracking: true,
  clickTracking: true,
  trackingSubdomain: 'links',
});
```

```php
$resend = Resend::client('re_xxxxxxxxx');

$resend->domains->create([
  'name' => 'example.com',
  'open_tracking' => true,
  'click_tracking' => true,
  'tracking_subdomain' => 'links',
]);
```

```python
import resend

resend.api_key = "re_xxxxxxxxx"

params: resend.Domains.CreateParams = {
  "name": "example.com",
  "open_tracking": True,
  "click_tracking": True,
  "tracking_subdomain": "links",
}

resend.Domains.create(params)
```

```ruby
require "resend"

Resend.api_key = "re_xxxxxxxxx"

params = {
  name: "example.com",
  open_tracking: true,
  click_tracking: true,
  tracking_subdomain: "links",
}
Resend::Domains.create(params)
```

```go
package main

import "github.com/resend/resend-go/v3"

func main() {
  client := resend.NewClient("re_xxxxxxxxx")

  params := &resend.CreateDomainRequest{
    Name:              "example.com",
    OpenTracking:      true,
    ClickTracking:     true,
    TrackingSubdomain: "links",
  }

  client.Domains.Create(params)
}
```

```rust
use resend_rs::{types::CreateDomainOptions, Resend, Result};

#[tokio::main]
async fn main() -> Result<()> {
  let resend = Resend::new("re_xxxxxxxxx");

  let opts = CreateDomainOptions::new("example.com")
    .with_open_tracking(true)
    .with_click_tracking(true)
    .with_tracking_subdomain("links");

  let _domain = resend.domains.create(opts).await?;

  Ok(())
}
```

```java
import com.resend.*;

public class Main {
  public static void main(String[] args) {
    Resend resend = new Resend("re_xxxxxxxxx");

    CreateDomainOptions params = CreateDomainOptions.builder()
      .name("example.com")
      .openTracking(true)
      .clickTracking(true)
      .trackingSubdomain("links")
      .build();

    CreateDomainResponse domain = resend.domains().create(params);
  }
}
```

```dotnet
using Resend;

IResend resend = ResendClient.Create( "re_xxxxxxxxx" );

var resp = await resend.DomainAddAsync(
    new DomainAddData()
    {
        Name = "example.com",
        TrackOpen = true,
        TrackClicks = true,
        TrackingSubdomain = "links",
    }
);
Console.WriteLine( "Domain Id={0}", resp.Content.Id );
```

```curl
curl -X POST 'https://api.resend.com/domains' \
     -H 'Authorization: Bearer re_xxxxxxxxx' \
     -H 'Content-Type: application/json' \
     -d '{
  "name": "example.com",
  "open_tracking": true,
  "click_tracking": true,
  "tracking_subdomain": "links"
}'
```

```cli
resend domains create --name example.com \
  --open-tracking \
  --click-tracking \
  --tracking-subdomain links
```

</CodeTabs>

You can also verify the [tracking domain via the API](/docs/api-reference/domains/verify-domain).

## Pair with webhooks

Custom tracking is most powerful when combined with [webhooks](/docs/webhooks/introduction). Every open and click fires an event in real time, so you can:
- Measure performance
- Segment your audience
- Refine your emails

## Get started today

Custom tracking domains are free for all Resend users.

Visit the [custom tracking domain docs](/docs/dashboard/domains/tracking#custom-tracking-domain) to get started.
