> ## Documentation Index
> Fetch the complete documentation index at: https://docs.botflow.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# Domains and proxies

> Your own domains for tracking links and landings, and proxies for sending events to Facebook CAPI.

Domains and proxies are needed by campaigns with the **Facebook Ads** source. A domain serves the tracking links
and landings, while a proxy delivers conversion events to Facebook. Campaigns with the Telegram source or an invite
link do not need them.

Both sections live in the "Tracker" section; in its horizontal menu they are the "Domains" and "Proxies" tabs.
Everyone with tracker access sees them and picks a domain and a proxy for a campaign from all of the company's
domains and proxies, whoever added them. The owner and administrators with tracker access manage every domain
and proxy. A buyer and a team lead buyer add their own, and check, edit and delete only the ones they added.

## Domains

Your own domains are needed for tracking links and landings. Without a connected domain the tracking links of
Facebook campaigns do not work: the link in the ad goes through your domain, leads to the landing and on into the
bot.

Each domain is connected in one of two modes. The choice depends on where you keep DNS and who issues the SSL
certificate.

> [card] Manual (CNAME)
>
> You create the CNAME record at your own DNS provider. You issue and maintain the certificate yourself. BotFlow checks the record and activates the domain. If your own proxy or CDN other than Cloudflare sits in front of the domain, BotFlow sees the proxy's address instead of the visitor's, and click country, unique clicks, Proxy / VPN and the data sent to Facebook CAPI become inaccurate.

> [card] CF API
>
> BotFlow creates the zone and the DNS record through your Cloudflare API token. Cloudflare issues the certificate automatically. The token is connected once in "Settings → Integrations".

### Connecting a domain

**1. Add the domain**

Press "Add domain", enter a root domain (for example, `example.com`) or a subdomain (`track.example.com`) and choose the mode. The CF API mode is available only when a Cloudflare API token is connected.

**2. Set up DNS**

In **Manual** mode expand the domain row: the panel shows the exact CNAME record with the Source, Type and Target fields. Create it at your DNS provider. In **CF API** mode BotFlow creates the record itself; for a new zone the panel tells you the NS servers to set at the domain registrar.

**3. Check the status**

Press "Check status". The domain becomes active once DNS propagates. A CNAME propagates in 5-15 minutes, while changing NS servers at a registrar can take from a few minutes to a day.

### Domain statuses

Every domain has one of three statuses.

| Status | What it means |
| - | - |
| **Active** | DNS is set up correctly and the domain is ready to serve tracking links. |
| **Pending** | The record is not found yet or is still propagating. For domains on CF API the record is checked automatically; for Manual press "Check status" after creating the CNAME. |
| **Failed** | The check did not pass. Expand the row to see the error text and a setup hint. |

> [!NOTE]
>
> Subdomains are grouped under their root domain. Expand the root's row to see the subdomains, their statuses and
> the DNS instructions.

> [!WARNING]
>
> A domain cannot be detached while it is used in a campaign or while it has connected subdomains. Switch the
> campaign to another domain or delete the subdomains first. After detaching, delete the CNAME record in your DNS
> by hand.

## Cloudflare API token

The CF API mode creates zones and DNS records in your Cloudflare account automatically, so you don't write every
record by hand. For that, connect an API token with limited rights once in "Settings → Integrations".

**1. Create the token**

Open `dash.cloudflare.com/profile/api-tokens`, press **Create Token** and choose **Custom token**.

**2. Grant the rights**

The token needs permissions to manage zones and DNS:
\
• `Zone` / `Zone` / `Read`
\
• `Zone` / `Zone` / `Edit`
\
• `Zone` / `Zone Settings` / `Edit`
\
• `Zone` / `DNS` / `Edit`
\
In Account Resources choose `Include / All accounts`, and in Zone Resources `Include / All zones`.

**3. Paste the token**

Copy the token and paste it into the field on the integration page. Press "Connect". The token is used only to manage your domains and is never shown again.

Once connected, the page shows the token's status and the time of the last check. The "Check connection" button
re-checks the token, and "Disconnect" removes the integration.

| Token status | What it means |
| - | - |
| **Active** | The token is valid and domains in CF API mode are managed automatically. |
| **Invalid** | The token does not pass the check. Check its rights and create a new one. |
| **Token revoked** | The token was revoked on Cloudflare's side. Connect a new one. |

> [!NOTE]
>
> One Cloudflare API token is connected per company. If you disconnect it, the domains already created in CF API
> mode stop being managed through the API but remain in your Cloudflare account.

## Proxies

The Facebook Conversions API (CAPI) does not accept events sent from server addresses. For conversion events to
reach Facebook, the platform sends them through your proxy. A proxy is needed only by campaigns with the Facebook
Ads source.

### Adding a proxy

Press "Add" and fill in the fields.

> [card] Name
>
> A clear name you will recognise the proxy by in the list. For example, `DE residential #1`.

> [card] Type
>
> `HTTP / HTTPS` or `SOCKS5`.

> [card] Host and port
>
> The proxy address and a port from 1 to 65535.

> [card] Login and password
>
> Optional. Fill them in if the proxy requires authorisation.

### Checking a proxy

The check button in a proxy row sends a test request and shows the result. It tells you the proxy works before you
launch a campaign.

| Status | What it means |
| - | - |
| **OK** | The proxy answered, and the latency in milliseconds is shown. |
| **Timeout** | The proxy did not answer in time. |
| **Not working** | The proxy returned an error or is unavailable. The error text is visible in the row. |
| **Not checked** | The check has not been run yet. |

> [!TIP]
>
> One proxy can be reused in several Facebook campaigns. The proxy is chosen on the "Tracking" step when creating a
> campaign, next to the domain and the FB Pixel. More about campaigns in [Tracker: overview](https://docs.botflow.cc/en/tracker.md).

> [!NOTE]
>
> A disabled proxy is marked in the list and is not used for sending. The list is filtered by status, and the search
> goes by name or host.

## What's next

> [card] [Tracker: overview](https://docs.botflow.cc/en/tracker.md)
>
> Clicks, conversions, traffic metrics and creating Facebook campaigns.

> [card] [Postbacks and affiliates](https://docs.botflow.cc/en/postbacks.md)
>
> Receiving events from affiliate networks and passing them to Facebook CAPI.

> [card] [Landings](https://docs.botflow.cc/en/landings.md)
>
> Telegram clones and "Custom HTML" landings for Facebook traffic.

> [card] [Team and settings](https://docs.botflow.cc/en/settings.md)
>
> Roles, tracker access and connecting Cloudflare.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.