Setting up a custom tracking domain with a CNAME: the DNS steps, and what to do when it won't connect

November 28, 2026 · Hoplytic team · 5 min read

The short version: this guide in 64 seconds.
Read the video transcript

How do you put your tracking links on your own domain? With one CNAME record.

Pick a subdomain, like go dot your site dot com. A CNAME can't sit on the root domain beside other records, such as email.

At your DNS provider, add a record of type CNAME. For the name, type just go, not the full address. For the target, paste exactly what your tracker shows.

If it won't connect, remove any older record with the same name. Make sure proxying is off. On Cloudflare that's the grey cloud. Then check it yourself with nslookup, instead of waiting hours.

Keep the record and renew the domain, because every link on it stops working if either goes.

In Hoplytic, type the subdomain under Domains and you get one CNAME to add. The page checks by itself and turns green, and HTTPS is set up automatically. You can connect up to twenty domains, and the first adds a thousand bonus clicks.

The full guide is right below. Hoplytic: ad tracking made simple.

Key points

Connecting your own tracking domain is one DNS record. It still goes wrong often enough that it's worth understanding what the record does, so you can fix it in five minutes instead of waiting a day.

Short answer: pick a subdomain such as go.yoursite.com, then at your DNS provider add a CNAME record with name go and the target your tracker gives you. Remove any other record with that name, leave proxying off, and check it with nslookup go.yoursite.com. Once the CNAME resolves, the tracker can issue an HTTPS certificate and your links work on your domain.

What the CNAME actually does

A CNAME record says "this name is an alias for that name". When a visitor clicks https://go.yoursite.com/tent:

  1. Their browser asks DNS for go.yoursite.com.
  2. Your DNS answers: it's an alias for domains.tracker.example (the target).
  3. The browser looks up the target's address and connects to your tracker's server.
  4. The tracker sees the request was for go.yoursite.com, finds your link tent, and redirects.

Because it's an alias rather than a fixed IP address, the tracker can move servers without you changing anything. Why you want your own domain in the first place is covered in tracking redirects and domains.

Choose the name

Add the record

FieldValueCommon mistake
TypeCNAMEChoosing A, which needs an IP address
Name / HostgoTyping go.yoursite.com, which many providers turn into go.yoursite.com.yoursite.com
Target / Value / Points toExactly what your tracker showsA typo, a missing part, or https:// added in front
TTLDefault or AutoNone; lower TTLs only speed up later changes
Proxy (Cloudflare)DNS only (grey cloud)Leaving the orange cloud on

Some providers show a trailing dot on the target (domains.tracker.example.). That's normal DNS notation; leave it if the form adds it.

Check it yourself

You don't have to wait for your tracker's page to turn green. From a terminal:

nslookup go.yoursite.com
# or
dig go.yoursite.com CNAME +short

That last-but-one case catches many people: the domain was bought at one company but its nameservers point to another (often Cloudflare or a host). Records only count at the provider listed as the domain's nameserver. nslookup -type=NS yoursite.com tells you which.

HTTPS and CAA records

Once the CNAME resolves, the tracker requests a certificate for your subdomain, usually automatically. If it fails while DNS is right, check for a CAA record on your domain. A CAA record lists which certificate authorities may issue certificates for it; if your tracker's authority isn't on the list, issuance is refused. Ask your tracker which authority it uses and add it, or leave CAA records off if you don't use them.

Keep it working

When more than one domain makes sense

One tracking domain is enough for most people. A second one helps when:

Each extra domain is one more CNAME and one more renewal to keep track of. Write down which domain is used where.

How it works in Hoplytic

In Hoplytic you type the subdomain under Domains and get one CNAME record to add. It detects your DNS provider and shows that provider's steps, the page checks by itself and turns green when the record works, and HTTPS is set up automatically. Existing links work on the new domain straight away, you can connect up to 20 domains, and the first one adds 1,000 bonus clicks that never expire. The custom domain help has the exact record, the Cloudflare option and fixes for "Waiting for DNS".

Type your subdomain, connect it, add one CNAME record.

Questions people ask

What is a CNAME tracking domain?

A subdomain you own, such as go.yoursite.com, with a CNAME record that points it at your tracker's server. Your tracking links then use your domain instead of the tracker's shared one.

Can I use my root domain as a tracking domain?

Usually not with a CNAME: DNS rules don't allow a CNAME on the root next to the other records a root domain needs. Some providers offer CNAME flattening or ALIAS records to work around it, but a subdomain is simpler and keeps your main site separate.

How long does a CNAME take to work?

Often a few minutes, sometimes a few hours, depending on your DNS provider and the record's TTL. If nslookup shows the right target and it still isn't connected after a few hours, look for a conflicting record or a proxy.

Should I turn on the Cloudflare proxy for my tracking domain?

Usually no. With the orange cloud on, Cloudflare answers instead of your tracker, which can hide the record and add its own bot checks in front of real clicks. Set the record to DNS only unless your tracker documents a proxied setup.

More in Tracking fundamentals

Also: tracking glossary · ad platform macros · Markdown copy