Cherry Seed

What is a first-party subdomain for tracking and why does it matter?

first-party subdomain custom tracking domain cname cloaking itp server-side tracking

Quick Answer

A first-party subdomain is a tracking endpoint hosted on your own domain, like data.yourstore.com, so analytics requests look first-party to the browser rather than third-party. It matters because browsers and ad blockers treat third-party domains far more harshly: Safari ITP and filter lists block third-party cookies or cap them at 7 days, while genuine first-party cookies survive far longer. The catch is that a subdomain only helps if it's truly yours; if it CNAME-cloaks to a third-party tracker, Safari uncloaks it and applies the third-party cap anyway. Real first-party tracking serves from infrastructure you actually control.

Full Answer

Browsers decide how to treat a cookie or request largely by domain. Anything on a domain different from the site you're visiting is third-party, and third-party is where the restrictions bite: Safari's ITP and ad-blocker filter lists target third-party domains for blocking and short cookie lifetimes. A first-party subdomain, such as analytics.yourstore.com on the same registrable domain as your store, lets tracking requests count as first-party, which dodges much of that treatment.

That's the appeal, but it comes with a sharp condition. The trick only works if the subdomain genuinely resolves to infrastructure you control. The old workaround, pointing a vanity subdomain via CNAME at a third-party tracking vendor, looked first-party on paper but Safari now detects this CNAME cloaking, treats the cookie as third-party, and caps it at seven days. Brave goes further and uncloaks CNAME subdomains outright. So a cloaked subdomain buys you nothing durable.

Real first-party tracking means the endpoint, the cookie-setting, and ideally the event processing all run on your own server and domain. Done that way, the subdomain isn't a disguise, it's a true extension of your origin, and the cookies it sets server-side aren't subject to the script caps that kill client-side tracking. The subdomain is a means; first-party ownership is the point.

Sources

Programmatic Access

GET https://seresa.io/wp-json/cherry-tree-by-seresa/v1/seeds/845

Cite This Answer

Cherry Tree by Seresa - https://seresa.io/seed/server-side-tracking-basics/first-party-subdomain-tracking