Option 1 : Reverse Proxy DNS
How does this solution work?
By using a reverse proxy, you force the traffic from your tracking server to pass through the DNS of your browsing website. The IPs of your browsing website server (example.com) and your tracking server (tagging.example.com) will no longer appear when cookies are set on the user's browser = only the IP of your reverse proxy will be visible. Thus, when the browser checks the IP of your browsing server and the IP of your tracking server, these IPs will be exactly the same. The cookies set by your tracking server will therefore be considered first-party cookies, and their lifespan will be 13 months.
![Cloudflare enabled](/images/safari-resilience/cloudflare_enabled.png)
If you are already using a reverse proxy like Cloudflare, this is the best option to continue maintaining your cookies in the new version of Safari.
Detailed setup
-
Go to your Cloudflare account.
-
Select your website on the interface.
-
Go to SSL/TLS then Overview, and make sure the encryption mode is set to Full or Full (Strict).
If not, you can create a configuration rule to be Full only on the tagging domain.
![SSL/TLS Overview](/images/safari-resilience/reverse-proxy-full-full-strict.png)
-
Go to SSL/TLS and select Origin Server.
-
Click on Create a certificate, and leave the options as default.
-
In the Hostname section, enter the domain defined in Addingwell, for example: metrics.example.com.
![Create a certificate](/images/safari-resilience/reverse-proxy-create-certificate.png)
- Click on Create.
Once you have created the certificate, Cloudflare will provide you with the certificate and the private key, keep them for later. Please note that the private key will only be given once.
![Certificate details](/images/safari-resilience/reverse-proxy-certificate.png)
- In your workspace on app.addingwell.com, under Dashboard > Domains, and on your domain, select Set reverse-proxy.
![Set reverse-proxy in Addingwell](/images/safari-resilience/reverse-proxy-set-reverse-proxy.png)
- Fill in the fields with your certificate and key provided by Cloudflare.
![Addingwell reverse-proxy configuration](/images/safari-resilience/reverse-proxy-addingwell-configuration.png)
- Once the certificates have been registered, you should see an icon next to your domain.
![Reverse-proxy icon](/images/safari-resilience/reverse-proxy-icon-proxy.png)
- Back on Cloudflare, in the left menu, select DNS and enable the Cloudflare proxy on the DNS record corresponding to the domain linked to Addingwell.
![Activate Cloudflare proxy](/images/safari-resilience/reverse-proxy-activate-proxy.png)