Bind a Custom Domain
After deploying, you need to point your own domain at the deployment platform so that email tracking links use your own domain.
DNS flexibility across the four platforms:
| Platform | DNS requirement | Connection method |
|---|---|---|
| Cloudflare Workers | Entire zone must be hosted on CF | NS-level |
| Vercel | Any DNS provider | CNAME |
| Netlify | Any DNS provider | CNAME |
| Deno Deploy | Any DNS provider | CNAME |
Cloudflare Worker
Prerequisite: your domain is already hosted on Cloudflare (DNS at Cloudflare).
Option A: Workers Routes (recommended — full subdomain takeover)
Best for: dedicating a subdomain (e.g., track.yourdomain.com) to tracking.
- Open Cloudflare Dashboard → select your domain
- Left sidebar DNS → Records → Add record
- Type:
AAAA - Name:
track(or any subdomain you want) - IPv6 address:
100::(placeholder, Worker handles all requests) - Proxy status: Proxied (orange cloud must be on)
- Type:
- Left sidebar Workers Routes → Add route
- Route:
track.yourdomain.com/* - Worker: select the just-deployed
email-track-domain
- Route:
- Takes effect within minutes. Visit
https://track.yourdomain.com/r/testto verify it reaches your backend.
Option B: Worker Custom Domain (simpler)
Best for: binding a Workers project directly to a domain (Cloudflare handles DNS and SSL automatically).
- Open Workers Dashboard → select
email-track-domainWorker - Settings → Triggers → Custom Domains → Add Custom Domain
- Enter
track.yourdomain.com, confirm - Cloudflare auto-creates DNS records and issues an SSL certificate
Difference: Option A is flexible (can route specific paths), Option B binds the whole domain (simpler). Most users should pick B.
Vercel
- Open Vercel Dashboard → select project → Settings → Domains
- Enter
track.yourdomain.com, Add - Vercel will show the DNS record you need to add at your DNS provider, similar to:
Type: CNAME Name: track Value: cname.vercel-dns.com - After adding DNS, wait a few minutes for Vercel to auto-issue the SSL certificate
Netlify
- Open Netlify Dashboard → select site → Domain management → Custom domains → Add a domain
- Enter
track.yourdomain.com→ Verify → Yes, add domain - Netlify shows the DNS records to add at your DNS provider:
Type: CNAME Name: track Value: <your-site>.netlify.app - Wait for SSL to be issued (minutes to 24 hours)
Deno Deploy
- Open dash.deno.com → select project → Settings → Domains → Add Domain
- Enter
track.yourdomain.com, Deno Deploy gives two records:Or use CNAME:Type: A Name: track Value: <your-IPv4> (example, use the actual value) Type: AAAA Name: track Value: ... (IPv6)Type: CNAME Name: track Value: <project>.deno.dev - Add the DNS records, then return to Deno Deploy and click Verify
- SSL is issued automatically
Verification
After deployment + binding, visit in your browser:
| URL | Expected behavior |
|---|---|
https://track.yourdomain.com/ | 302 redirect to google.com (root not in allowlist) |
https://track.yourdomain.com/test.php | 302 redirect to google.com (blocked extension) |
https://track.yourdomain.com/r/abc123 | Forwarded to your backend (allowed path) |
https://track.yourdomain.com/favicon.ico | Forwarded to your backend (allowed root file) |
If the third one returns 502 "Backend fetch failed", BACKEND_HOST is misconfigured or the backend is unreachable.
Using in emails
Replace all tracking links in your emails that pointed to cf-track.laifa.xin with track.yourdomain.com. For example:
Old: http://cf-track.laifa.xin/r/abc123
New: https://track.yourdomain.com/r/abc123Open/click statistics still flow to your original backend, but recipients see your own domain — more professional, and improves your anti-spam score.