Browse documentation

Custom tracking domains

Use a branded host for affiliate redirects while keeping the same /r/ path, with automatic or manual DNS setup.

Updated August 11, 2026

A custom tracking domain gives your affiliate links a host that matches your product. The default redirect path is /r/<id>. A branded link uses the same path with a different host:

/r/<id>
https://go.mon-produit.fr/r/<id>

Only the host changes. Keep the /r/<id> path and the link’s public ID unchanged. The proposed host is automatic: AffiHQ uses go. plus the product’s registrable domain. For a product domain such as mon-produit.fr, the proposed host is go.mon-produit.fr; it is not a free-form hostname field.

Where to configure it

In the merchant workspace, open Products, open the product, then find Custom tracking domain. Only merchant workspace owners and admins can connect, replace or disconnect the mapping. Other roles may see its state but cannot change DNS or certificate setup.

Before you start

  • Use a valid public product domain and control its authoritative DNS.
  • Keep the redirect host public. Do not put Cloudflare Access, Zero Trust or another login wall in front of go.*; visitors must be able to reach /r/<id> without signing in.
  • A Cloudflare zone can be empty. It only needs to be added to the Cloudflare account and its registrar nameservers must point to Cloudflare before automatic setup can use it.
  • You do not need a cloudflared tunnel for each product. The tracking host uses the CNAME and the managed SaaS hostname described below.

Automatic setup with Cloudflare

AffiHQ checks the authoritative nameservers for the product domain. When they are Cloudflare nameservers, the editor offers Connect Cloudflare.

  1. Open the product’s Custom tracking domain section and select Connect Cloudflare.
  2. Authorize the Cloudflare zone that owns the product domain.
  3. AffiHQ checks the exact proposed hostname and the CNAME target shown in the editor.
  4. If no record exists, it creates that CNAME. If the exact CNAME already exists, it treats the setup as a no-op.
  5. AffiHQ registers the hostname with its managed SaaS endpoint and waits for the hostname and certificate to become active.

An existing A, AAAA or different CNAME is a conflict. AffiHQ never replaces it silently. Review the record and explicitly confirm replacement only when that is the record you intend to change. The Cloudflare authorization is temporary: AffiHQ revokes the access token after the operation, including after a successful setup whenever Cloudflare permits revocation.

Manual DNS setup

Use the manual path when another provider hosts authoritative DNS, or when you do not want to authorize Cloudflare. Select Check DNS and continue in the product editor. AffiHQ shows the exact record to create:

  • Name: the proposed go... hostname, such as go.mon-produit.fr;
  • Target: the CNAME target shown in the editor.

Create exactly that CNAME. Do not use an A or AAAA record. If your DNS provider offers a proxy switch, choose DNS-only or non-proxied for this record. Then select Check DNS and continue again. AffiHQ provisions the managed hostname and certificate only after public DNS resolves to the exact target.

States and waiting

The editor can show these states:

  • Ready: the product can start automatic or manual setup.
  • DNS pending: the expected CNAME is missing or has not propagated yet.
  • Provisioning: the CNAME is present and AffiHQ is waiting for the managed hostname or certificate.
  • Active: the exact CNAME, the provider hostname and TLS are all active.
  • Conflict: another DNS record or provider hostname needs review; no replacement happens without confirmation.
  • Error: the last check or provider operation needs attention.
  • Unavailable: this deployment has no configured tracking CNAME or managed-hostname service.
  • Disconnected: the mapping was removed and can be configured again.

After setup starts, the editor polls about every 5 seconds for up to 12 checks (about 60 seconds). Use Refresh status for another check. DNS propagation can take longer; AffiHQ does not promise a fixed propagation time. A domain is not active until all three pieces are ready: the exact CNAME, the managed provider hostname and its TLS certificate.

Keep the generated /r/<publicId> path and replace only its host with the active custom host. The default AffiHQ domain remains valid, so you can keep using it while DNS or TLS is pending and as a fallback.

For now, AffiHQ does not automatically replace the host in every displayed link. Once the domain is active, copy the existing link, keep /r/<publicId>, and replace only the domain name.

Disconnecting a domain

Disconnecting a Cloudflare mapping requires a new Cloudflare authorization. AffiHQ removes the exact CNAME record only when its target is still the expected target; it does not delete a changed or conflicting record. If that identical CNAME was already present before you connected the domain, it may also be removed during disconnect, so verify it and recreate it if you need to keep it. The managed hostname is then removed, and the temporary authorization is revoked.

AffiHQ never edits manual DNS. Remove the manual CNAME at your DNS provider when you no longer need it. Disconnecting a mapping does not delete click history, attributions, commissions or payout history.

Troubleshooting

The editor says unavailable or shows no CNAME target

The deployment is not configured with the tracking CNAME target or managed-hostname service. Contact the deployment administrator; changing your DNS cannot fix this state.

DNS is missing or still pending

Create the exact CNAME shown in the editor, then wait for public DNS propagation and select Refresh status. Check the hostname and target character for character. If your nameservers are not Cloudflare’s, use the manual path.

DNS conflict

An A, AAAA or another CNAME currently uses the proposed host. Resolve the conflict at your DNS provider, or use the Cloudflare Replace DNS record action only after confirming that replacing that exact record is safe. AffiHQ does not replace multiple records or an unexpected target.

TLS or certificate is pending

Keep the exact CNAME in place and select Refresh status after waiting. Do not upload or paste a manual certificate; the managed hostname provider handles TLS after DNS is exact.

The branded host returns 404

The host is not active yet, points to the wrong product mapping, or is unknown to AffiHQ. Use the default AffiHQ link while the state is pending, and confirm that the active host belongs to the product whose /r/<publicId> link you published.

I cannot change the product domain

An existing tracking mapping blocks a product-domain change. Disconnect the tracking domain first, then change the product domain and configure the new proposed host.

Cloudflare is not detected

AffiHQ detects Cloudflare from authoritative nameservers, not from a proxy toggle on one record. If the registrar nameservers are elsewhere, use the manual CNAME setup or update delegation before trying Cloudflare automatic setup.

Security

The OAuth token authorized by the merchant is not persisted in AffiHQ after the operation. Each authorization grant is bound to the merchant, user and product, can be consumed once, and expires after 10 minutes; AffiHQ revokes it on a best-effort basis. AffiHQ only operates on the expected product hostname and exact CNAME; never paste a Cloudflare key or token into the product editor.

For the surrounding redirect and attribution behavior, read Affiliates, campaigns and links. For product settings, see Products and rules.