Skip to Content
Platform.Ontology

CNAME cloaking

A tracker is served from a subdomain of the site (like metrics.site.com) that points at the tracker's servers.

Used to track youTracking across apps and sitesIn sessionWeb browsersWhile you use itAfter you leave the site

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

BrowserStatusFirst versionReleasedNote
ChromeSupported12008-12-11Allowed
EdgeSupported1Not listedAllowed
FirefoxSupported12004-11-09Blocked only with extensions that read CNAME
SafariPartial142020-09-16Cookie lifetime capped to 7 days
Safari on iPhonePartial142020-09-16Cookie lifetime capped to 7 days
Chrome on AndroidSupported1Not listedNone
Samsung InternetSupported1.02013-04-27None

How a site asks for it

APIDNS CNAME to a third party plus Set-Cookie from that subdomain
How access is grantednone
What the user seesNone
Needs a secure context (HTTPS)No
Needs a user gestureNo
How long it lastsSafari: 7 days. Others: cookie lifetime set by the tracker (up to 400 days in Chrome)
How to take it backClear site data, browser privacy settings
Inside an iframeNot 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

TypeExampleApps
adsA shop hosts its Adobe or Criteo tracker at a subdomain so blockers do not stop it.Adobe Analytics, Criteo
analyticsA publisher's analytics vendor serves data collection from the publisher's own domain to keep cookies for longer.Piano, Adobe Analytics
shoppingAn online store sets a tracker CNAME to follow shoppers from ad to checkout, even with blockers on.None named
mediaA 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
gamesA game portal hides its ad partner behind a subdomain so ads and player tracking are not blocked.None named
securityA 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

ScoreValueMeaning
Sensitivity4 of 5How revealing the data is
Utility3 of 5How useful it is to honest apps
Friction0 of 5How much the user has to do
Fingerprint bitsNot ratedRough 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)
  • 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.

On this page