> For the complete documentation index, see [llms.txt](https://server-side.docs.sirdata.net/sirdata-server-side/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://server-side.docs.sirdata.net/sirdata-server-side/english-1/f.a.q-server-side/tracking/first-party-infrastructure-and-cookie-optimization.md).

# First-Party Infrastructure & Cookie Optimization

In an ecosystem where browsers (Safari ITP, Firefox ETP) drastically limit the lifespan of third-party and even first-party cookies, the quality of your collection infrastructure is critical.

We offer a **Server-Side** approach that outperforms classic Reverse Proxy solutions in terms of performance and ease of deployment.

***

### 1. Dynamic DNS Infrastructure ("Smart NS")

#### A superior alternative to the Reverse Proxy

Unlike competing solutions that often require setting up a complex **Reverse Proxy** (involving server maintenance, SSL certificate management and Nginx/Cloudflare configuration on your side), we use **smart DNS delegation**.

#### How does it work?

Instead of pointing your tracking subdomain to a fixed IP address (via an `A` or `CNAME` record), we use an **NS (Name Server)** record.

This method allows us to control the infrastructure end-to-end and offers major advantages:

* **Anycast Network & Dynamic IP:** We automatically assign an IP located as close as possible to the end user based on their geolocation.
* **Zero-Latency Performance:** A-type DNS entries are generated dynamically. You can view this worldwide propagation here: [DNSChecker - tms.sirdata.com](https://dnschecker.org/#A/tms.sirdata.com).
* **Zero Maintenance:** No certificate or proxy server management on your side.

#### Impact on Cookies (Safari ITP)

This is the crucial point. Thanks to this **NS** configuration, the data flow is considered fully **First-Party** by browsers.

> **Result:** Cookie lifespan is natively extended on Safari (bypassing the 24h/7-day limitations), without needing to "cheat" with a heavy Reverse Proxy.

*Validated by trusted third parties (e.g. First ID), our infrastructure ensures maximum persistence of user identifiers.*

***

### 2. Cookie Restore: Continuity of the User Experience

Even with an optimized infrastructure, some browsers or user clean-ups can delete cookies. Our **Cookie Restore** feature ensures tracking continuity.

#### The concept

"Cookie Restore" secures the user identifier (User ID) on the server side. If a user returns to the site after their browser cookie has expired (for example, after 8 days in a long purchase journey), the server is able to recognize them and **restore the original cookie**.

#### Advantages

1. **Reliable Attribution:** Reconcile a conversion with an ad click that took place several weeks earlier.
2. **Unified Journeys:** Avoid treating a loyal customer as a "New User" on every visit.
