Source: https://usedataowl.com/docs/managed-proxy
Markdown source: https://usedataowl.com/docs/managed-proxy.md
Description: Bypass ad blockers without touching server code: point a CNAME DNS record to DataOwl to run first-party tracking on your own subdomain.

# Managed First-Party DNS Proxy: Bypass Ad Blockers with Zero Code

Route DataOwl through a subdomain you control without running proxy code. DataOwl handles the routing, the SSL certificate and event collection.

> **Recommended for most sites.** Use the managed proxy unless your app or web server already proxies requests. The [proxy guide](/docs/proxy-guide) compares both.

## Why use a proxy?

Ad blockers block known analytics domains. A subdomain of your own is much less likely to be blocked, which makes your numbers and your [revenue attribution](/docs/revenue-attribution-guide) more complete. You don't need it to start: add it before a launch, or whenever you want the visitors ad blockers hide.

Without a proxy, your pages load the script from `usedataowl.com` and send events there. With the managed proxy, both go through your subdomain instead, such as `a.yourdomain.com/js/script.cookies.js` and `a.yourdomain.com/api/e`.

## 1. Enable the managed proxy

1. Open your site's **Settings → Ad blockers**.
2. Find **Managed Proxy** and enter a neutral subdomain such as `a.yourdomain.com`.
3. Click **Enable**.

> Pick a short subdomain that doesn't describe analytics: `a.yourdomain.com` or `cdn.yourdomain.com` are good. Blocklists target names like `analytics`, `tracking` or `metrics`. Use a new subdomain, not the one your site runs on.

## 2. Add the DNS record

Settings shows the exact record to add at your DNS provider. For `a.yourdomain.com`:

| DNS field | Value |
| --- | --- |
| Type | CNAME |
| Name / Host | `a` |
| Target / Value | `proxy.${new URL(SITE_URL).host}` |

If settings also shows a TXT record, add it too: it proves you own the domain when the CNAME alone can't. You can delete it once the status is **Active**.

Propagation usually takes 1–10 minutes, and the certificate is issued as soon as DNS is right. Click **Check status** until the badge says **Active**.

## 3. Update your script tag

Load the script from your subdomain. It sends events next to wherever it was loaded from, so `src` is the only change:

```html
<script
  defer
  data-website-id="YOUR_SITE_ID"
  src="https://a.yourdomain.com/js/script.cookies.js"
></script>
```

Settings shows the tag with your subdomain and settings filled in.

## Verify

1. Visit your live site (not the subdomain itself) and open the browser's Network tab.
2. Check that the script loads from `a.yourdomain.com`, and events go to `https://a.yourdomain.com/api/e`.
3. The visit shows up on the **Realtime** page.

## Troubleshooting

### The status stays pending

- Check that the CNAME matches the one in settings, and that it's a DNS record, not a URL redirect or forwarding rule.
- If your DNS provider has a proxy mode (Cloudflare's orange cloud), turn it off for this record.
- Wait a few minutes, then click **Check status**.

### The status shows an error

- Re-check the record's type, name and value, and add the TXT record if settings shows one.
- Make sure you're editing the DNS zone of your root domain, such as `yourdomain.com`.

### Still blocked

- Avoid obvious subdomains such as `analytics`, `tracking`, `metrics` or `datasense`.
- Make sure the tag loads from `https://` and your subdomain.
- With a Content Security Policy, allow your subdomain in `script-src` and `connect-src`.

## Remove it

In **Settings → Ad blockers → Managed Proxy**, click the **×** next to the subdomain. Switch your script tag back to `https://usedataowl.com/js/script.cookies.js` first, then delete the DNS records.

## Compare the options

|  | Managed proxy | Self-hosted proxy |
| --- | --- | --- |
| Best for | Most sites | Apps that already proxy requests through their own server |
| Code | None | A few rewrites |
| DNS | One CNAME | None |
| SSL | Automatic | Your host's |
| Script URL | Your subdomain | A path on your domain, such as `/_ds/js/script.cookies.js` |
| Maintenance | Handled by DataOwl | Handled by your app or server |

For the self-hosted options, see the [proxy guide](/docs/proxy-guide).
