CNAME cloaking
A tracker is served from a subdomain of the site (like metrics.site.com) that points at the tracker's servers.
In one line
Can hide a tracker as part of the site's own address so it looks first party
A tracker is served from a subdomain of the site (like metrics.site.com) that points at the tracker's servers.
Makes tracking look first party so the cookie lasts longer and blockers miss it. Safari caps cookies set by such CNAME or mismatched IP hosts to 7 days. Studies found it on a few percent of top sites (Dimova et al 2021).
What it can and can't do
What the user does: Nothing. It happens when a page loads a script from a tracker disguised as the site
It can
- Serve a tracker from a name like metrics.site.com that points to a tracker's servers
- Set cookies that look like the site's own
- Last longer than third party cookies in some browsers
It cannot
- Stay hidden from Firefox and Safari, which check where the name really points
- Work for browsers that block known tracker names
- Get past a content blocker that checks the real destination
- Follow you to other sites with the same cookie
How it differs between platforms: Firefox, Safari and some content blockers check where the name really points and limit it. Chrome mostly does not.
Browser support
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 1 | 2008-12-11 | Allowed |
| Edge | Supported | 1 | Not listed | Allowed |
| Firefox | Supported | 1 | 2004-11-09 | Blocked only with extensions that read CNAME |
| Safari | Partial | 14 | 2020-09-16 | Cookie lifetime capped to 7 days |
| Safari on iPhone | Partial | 14 | 2020-09-16 | Cookie lifetime capped to 7 days |
| Chrome on Android | Supported | 1 | Not listed | None |
| Samsung Internet | Supported | 1.0 | 2013-04-27 | None |
How a site asks for it
| API | DNS CNAME to a third party plus Set-Cookie from that subdomain |
| How access is granted | none |
| What the user sees | None |
| Needs a secure context (HTTPS) | No |
| Needs a user gesture | No |
| How long it lasts | Safari: 7 days. Others: cookie lifetime set by the tracker (up to 400 days in Chrome) |
| How to take it back | Clear site data, browser privacy settings |
| Inside an iframe | Not listed |
Data you get
What comes back: Cookie ID from tracker host
Shape: string
How often: per request
No individual data fields. The signal is the access itself.
Technical limits
- Safari ITP limits CNAME or IP mismatched server cookies to 7 days
- Browsers with DNS access (Firefox with uBlock Origin) can uncloak
- Server must be delegated by the site
The story
What it is
A tracker is made to look like part of the site you are visiting, using a disguised web address.
For you
You never see it. The tracker's code loads from something like metrics.shop.com, which looks like the shop itself. Your blocker may not catch it, and its cookie may last longer.
For makers
A site that wants longer cookies and fewer blocked requests points a subdomain at a tracker's servers. It looks first party. Browsers now limit such cookies to about a week, and blockers started to check the real address.
Where you see it
| Type | Example | Apps |
|---|---|---|
| ads | A shop hosts its Adobe or Criteo tracker at a subdomain so blockers do not stop it. | Adobe Analytics, Criteo |
| analytics | A publisher's analytics vendor serves data collection from the publisher's own domain to keep cookies for longer. | Piano, Adobe Analytics |
| shopping | An online store sets a tracker CNAME to follow shoppers from ad to checkout, even with blockers on. | None named |
| media | A news site sets up a tag server on its domain, so its ad partners can set cookies as though they were the site. | None named |
| games | A game portal hides its ad partner behind a subdomain so ads and player tracking are not blocked. | None named |
| security | A privacy researcher uses DNS lookups to spot a hidden tracker behind a friendly sounding subdomain. | uBlock Origin |
Risks
- Hides who is tracking you
- Can bypass simple blockers
What the platform says
- Apple: Tracking prevention. WebKit explains that Safari limits cookies set by hosts that use CNAME or other cloaking to hide third party trackers.
Good uses and abuse
Legitimate uses
- Same site analytics hosting
Known abuse
- Evading tracking blockers and ITP
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 4 of 5 | How revealing the data is |
| Utility | 3 of 5 | How useful it is to honest apps |
| Friction | 0 of 5 | How much the user has to do |
| Fingerprint bits | Not rated | Rough identifying entropy, when known |
History
- 2020-11, Safari 14: ITP caps cookies set via CNAME cloaked requests to 7 days
- 2021-02, all: Dimova et al: CNAME tracking found on about 10% of 10,000 sites in a measurement (see paper)
Related capabilities
Related
- Server side tagging. Can send your activity to the site's own server first, then on to ad vendors
Sources
How well checked: Based on official documentation.