Custom Domains
Serve the Ours Privacy SDK, video, maps, and consent banner from your own domain so cookies are set first-party, server-side, and survive browser tracking-prevention rules.
A custom domain serves the Ours Privacy SDK from a subdomain you own, such as metrics.yourdomain.com, instead of from an Ours Privacy host. The same domain also serves your videos, maps, and cookie consent banner. Use this page to set one up and install from it.
Why use a custom domain
With a custom domain, your visitor cookie is set by the server, in the HTTP response from your own domain. That makes it:
- First-party. The cookie belongs to your site, so the tracking-prevention rules browsers apply to third-party hosts don't reach it.
- Durable. Server-set cookies aren't held to Safari's seven-day cap on cookies written by JavaScript, so a visitor who returns three weeks later is still recognized as the same visitor. See Visitor Identity and Matching.
- Easy to allow-list. Your Content Security Policy only needs your own host, not a third-party one.
Set up a custom domain
The dashboard generates the DNS records for your account and tracks each domain until it's ready.

- Open Custom Domains and click Get Started.
- Click Add Domains (or Edit Domains), enter each subdomain you want to serve from, then Save Domains.
- Under Configure DNS, add one CNAME record per domain at your DNS provider. Use Download CSV to hand the records to whoever manages your DNS.
- Wait for DNS to propagate, typically 5 to 60 minutes. The page refreshes on its own: each domain's DNS status moves to Configured and its Certificate to Issued.
- When Ready to Install appears, copy the script tag into your site's
<head>. The Verify tab shows how to confirm the domain serves the SDK.
If the page shows Check DNS and certificate, click it to finish activating the certificate. If it shows Certificate needs attention, contact support@oursprivacy.com.
Serve video, maps, and your consent banner from your domain
One domain covers more than tracking. Once it's ready, these snippets load from it, so everything a visitor sees on your site comes from your own host:
- Video: the player and video files load from your domain instead of a shared Ours Privacy host. Choose the domain from Serve from above the embed snippet.
- Maps: map tiles and assets load from your domain, so your location finder reads as first-party content to search engines.
- Cookie consent: your consent banner loads from your domain, alongside the rest of your site.
Install from your custom domain
Once a domain is ready, the other install snippets in the dashboard load from it too, including the Web SDK, Tag Manager, Session Replay, and translation embeds. With more than one ready domain, pick which one a snippet uses from Serve from.
If you initialize the Web SDK yourself, pass your domain in init:
ours('init', 'YOUR_TOKEN', {
custom_domain: 'https://metrics.yourdomain.com',
});Installing through Google Tag Manager? Also add the domain to the tag template's Injects Scripts permission, or GTM blocks the script. See Using a Custom Domain.
The same domain also serves 1-pixel image tracking, redirect tracking, and branded short links, so every touchpoint shares one host and one visitor identity.
Next Steps
- Web SDK reference: every
initoption. - Visitor Identity and Matching: how the first-party cookie keeps returning visitors recognized.
- Allowed Domains: control which sites can send events.
How is this guide?

