CNAME Cloaking

CNAME cloaking points a subdomain of your site, such as t.yourshop.com, to a tracking vendor's server with a DNS CNAME record, so the vendor's tracking looks first-party to browsers and ad blockers. Safari, uBlock Origin in Firefox and Brave look behind it.

Daniel Busch
Written by Daniel Busch · Chief of Staff · Updated

In short

  • Is: a DNS CNAME record that points a subdomain of your site to a tracking vendor's hostname, so the vendor's requests and cookies look first-party
  • Why it exists: to get past third-party cookie blocking, Safari's 7-day cap on JavaScript cookies and blocklists that match vendor hostnames
  • Caught by: Safari since 2020, which caps the cookies such a subdomain sets to 7 days, and uBlock Origin in Firefox and Brave, which block it when the vendor is listed. Firefox's own ETP doesn't look behind CNAMEs
  • Risk: the vendor's server receives every cookie scoped to your domain. Researchers found CNAME trackers on 9.98% of the top 10,000 websites and cookie leaks on 95% of the sites that used one
  • Not the same as: a server of your own in your site's IP range, which neither Safari's CNAME rule nor its IP rule caps

How CNAME cloaking works

A CNAME record makes one hostname an alias of another. For CNAME cloaking, a shop adds a record like this at its DNS host:

t.yourshop.com CNAME collect.vendor.example

The browser on yourshop.com loads https://t.yourshop.com/… and treats it as the same site. It sends along every cookie scoped to yourshop.com, and the response can set cookies that count as first-party. A blocklist that names vendor.example doesn’t match, because the browser never sees that name unless it looks the CNAME up.

Vendors turned to it as browsers closed the older routes: third-party cookies, which Safari has blocked since 2020; cookies set by JavaScript, which Safari’s ITP has capped at 7 days since 2019; and blocklists that name the vendor’s domain.

It spread quickly. Researchers found CNAME-based trackers on 9.98% of the 10,000 most visited websites and cookie leaks to them on 95% of the sites that embedded one (The CNAME of the Game, PoPETs 2021). The record is also a security risk once nobody looks after it: when WebKit announced its defense, it cited a report of 250 websites of banks, healthcare companies, restaurant chains and civil rights groups that had been compromised through mismanaged CNAME cloaking (WebKit).

How Safari, uBlock Origin and Brave respond

  • Safari. Since Safari 14 and iOS 14 in 2020, cookies set in the response of a third-party CNAME-cloaked request expire after 7 days. WebKit defines that as a first-party subresource that resolves through a CNAME differing from the first-party domain and from the page’s own CNAME, if it has one (tracking prevention policy). Since Safari 16.4 in 2023, the same cap applies when a subdomain without a CNAME points to a server whose IP address shares less than half with your site’s. Private Browsing has blocked cloaked requests to known trackers outright since Safari 17.
  • uBlock Origin in Firefox. It looks up the canonical name through Firefox’s DNS API and applies its lists to it, since version 1.25 in 2020 and by default since 1.34. Chrome and the other Chromium browsers give extensions no such API, so blockers there can’t do the same.
  • Brave. Since Brave 1.17 in 2020, Brave checks each request twice, once as requested and once with its canonical name: in Standard mode for third-party requests, in Aggressive mode for all.
  • Firefox itself. Its ETP doesn’t look behind CNAMEs. Mozilla closed the request as WONTFIX, for the reasons the ETP entry’s comparison with ITP gives.

AdGuard also keeps a public list of known CNAME trackers.

Our tracking audit of 27 October 2026 shows the result in practice. Served from a subdomain of the shop through a CNAME, Hyros and Rockerbox got past seven of the nine blocker profiles we test; only uBlock Origin in Firefox and Brave Aggressive, the two that look behind every CNAME, stopped them. Safari and iOS capped their cookies.

A CNAME to a vendor vs a server of your own

SetupWhat the DNS saysSafari’s cookie capBlockers that look behind CNAMEsWho receives your domain’s cookies
CNAME cloakingt.yourshop.com is a CNAME to the vendor’s hostname7 daysBlock it if the vendor is listedThe vendor’s server
Vendor IP, no CNAMEt.yourshop.com has an A record to the vendor’s server7 days since Safari 16.4, if the IP is outside your site’s rangeNothing to look behind; path and hostname rules still applyThe vendor’s server
Your own servert.yourshop.com runs on your infrastructure, in your site’s IP rangeNoneNothing to look behindYour server, which decides what goes on to whom

What decides is who operates the server behind the name. Safari uses the CNAME target and the first half of the IP address as its stand-in for that question, and WebKit calls the IP check heuristic and open to change.

Is adtribute’s tracking just a CNAME?

A question prospects and customers ask us in calls. No: connecting your domain adds an A record next to the CNAME record, both with hostnames on your domain, and the script loads from the A record’s hostname (docs: Connect your domain for first-party tracking).

In our tracking audit, none of the nine blocker profiles stopped the attribution software adtribute, the two that look behind CNAMEs included, and Safari and iOS didn’t limit its cookies. The Tracking Checker shows the same for the setup on your own store.

FAQ about CNAME Cloaking

Does CNAME cloaking still work?

Against blockers that only read hostnames, often yes: extensions in Chrome can’t see behind a CNAME. Against Safari, no: since 2020 it caps the cookies such a subdomain sets to 7 days, which removes the main reason for the setup on 24% of web traffic. uBlock Origin in Firefox and Brave block cloaked trackers whose target is on their lists.

How can I tell whether a subdomain is CNAME-cloaked?

Look up its DNS records with a command such as dig or nslookup, or with any online DNS lookup. If the subdomain resolves through a CNAME to a hostname outside your own domain, a vendor’s server answers your visitors under your name. The Tracking Checker shows which blockers stop the requests to it.

Is a CNAME to a CDN cloaking too?

No. If your whole site runs behind a CDN, the page and its subresources resolve through the same provider, and WebKit’s rules exempt that case. A CNAME from one of your hostnames to another hostname of your own domain isn’t cloaking either. Safari 27.2, out in October 2026, fixed a bug that had capped the cookies of sites whose own hostname is a CNAME to another domain.

Is CNAME cloaking the same as server-side tracking?

No. Server-side tracking means a server sends the data on, for example conversions to Meta’s Conversions API. CNAME cloaking is a DNS setup that makes a vendor’s tracking in the browser look first-party. The two can be combined, but the CNAME doesn’t make the vendor’s server yours.