A custom tracking domain replaces your ESP's default click-tracking URL with your own branded domain (e.g., links.yourdomain.com instead of url1234.sendgrid.net). Set it up by creating a CNAME record pointing your subdomain to your ESP's tracking server, then enabling it in your ESP settings. This protects your deliverability from shared tracking domain reputation.
Custom Tracking Domains: Complete Setup Guide for Every ESP
Why Default Tracking Domains Are a Risk
When you send email through an ESP, every link gets rewritten for click tracking. Without a custom tracking domain, those links use the ESP's shared domain:
- SendGrid:
url1234.ct.sendgrid.net - Mailgun:
email.mailgun.net - Mailchimp:
mailchi.mp
The problem: you share that domain with every other sender on the platform. If spammers abuse the same tracking domain, spam filters flag it — and your links get caught in the crossfire.
The DNS Setup
Custom tracking domains require a CNAME record. The general pattern:
links.yourdomain.com CNAME tracking.youresp.com
ESP-Specific CNAME Records
| ESP | CNAME Target | Recommended Subdomain |
|---|---|---|
| SendGrid | sendgrid.net | links.yourdomain.com |
| Mailgun | mailgun.org | email.yourdomain.com |
| Klaviyo | trk.klaviyomail.com | trk.yourdomain.com |
| Postmark | pm.mtasv.net | links.yourdomain.com |
| HubSpot | Provided in portal settings | track.yourdomain.com |
| ActiveCampaign | Provided in account settings | links.yourdomain.com |
Check your ESP's current documentation for exact CNAME targets — they change occasionally.
Practitioner note: I set up custom tracking domains as part of every ESP onboarding. It takes 10 minutes and prevents the most common link-based deliverability problem. There's no reason not to do it.
Step-by-Step Setup
1. Choose Your Subdomain
Use a dedicated subdomain like links., email., or track.. Don't use your root domain — tracking domains handle redirects, and you don't want your main website routing through an ESP's tracking servers.
2. Create the CNAME Record
In your DNS provider (Cloudflare, Route 53, GoDaddy, etc.):
Type: CNAME
Name: links
Target: [ESP-specific target]
TTL: 3600 (or Auto)
If you're using Cloudflare, disable the proxy (orange cloud off) for the tracking subdomain. Cloudflare's proxy interferes with ESP tracking redirects.
3. Enable in Your ESP
Navigate to your ESP's tracking domain settings and add your custom domain. Most ESPs verify the CNAME automatically.
4. Verify SSL
After DNS propagation (usually 5-30 minutes), your ESP should provision an SSL certificate automatically. Test by sending yourself an email and clicking a link — the URL should show https://links.yourdomain.com/... with a valid certificate.
Multiple ESPs, Multiple Tracking Domains
If you use multiple ESPs (common with transactional + marketing split), use different subdomains for each:
links.yourdomain.com → SendGrid (transactional)
track.yourdomain.com → Klaviyo (marketing)
This keeps each ESP's tracking isolated and makes troubleshooting easier.
Practitioner note: The most overlooked tracking domain issue is DNS propagation delays during ESP migrations. Always set up the new tracking domain 48 hours before your first send through the new ESP. Don't discover it's not working when your welcome sequence fires.
DKIM and SPF Interaction
Custom tracking domains are separate from your authentication records. Your SPF and DKIM authenticate the sending domain (e.g., yourdomain.com), while the tracking domain handles link rewrites. They don't conflict, but they both need correct DNS records.
Troubleshooting
| Problem | Cause | Fix |
|---|---|---|
| Links show ESP default domain | CNAME not configured or not propagated | Check DNS, wait for propagation |
| SSL certificate error on links | ESP hasn't provisioned cert yet | Wait 30 min, then contact ESP support |
| Links broken after Cloudflare setup | Cloudflare proxy is enabled | Disable proxy (grey cloud) for tracking subdomain |
| Click tracking not working | Domain not enabled in ESP settings | Verify domain in ESP dashboard |
If your tracking domain setup is part of a larger ESP migration, schedule a consultation — I'll handle the full DNS and deliverability configuration.
Sources
- SendGrid: Custom Click Tracking Domain
- Mailgun: Tracking Domain Setup
- Klaviyo: Custom Tracking Domain
- Postmark: Custom Return-Path and Tracking Domains
v1.0 · April 2026
Frequently Asked Questions
What is a custom tracking domain?
A custom tracking domain is a subdomain you own (like links.yourdomain.com) that handles click tracking instead of your ESP's default domain. It's configured via a CNAME DNS record pointing to your ESP's tracking servers.
Does a custom tracking domain improve deliverability?
Yes. Shared tracking domains carry the collective reputation of all senders using them. If another sender on your ESP's default tracking domain gets blacklisted, your links are affected too. Custom tracking domains isolate your link reputation.
Do I need SSL on my custom tracking domain?
Yes. Modern email clients and browsers flag non-HTTPS links as insecure. Most ESPs handle SSL automatically when you configure a custom tracking domain. Verify it's working by clicking a tracked link and checking the URL bar.
Want this handled for you?
Free 30-minute strategy call. Walk away with a plan either way.