Sites & snippet

Custom domain

Serve the adfit snippet from your own subdomain instead of the shared cdn.adfit.io host. Delivering the snippet first-party makes it more resistant to ad blockers, and your existing cdn.adfit.io code keeps working alongside it. Custom domains are available on the Growth plan and up.

What a custom domain does

By default, adfit serves your snippet from cdn.adfit.io, a host shared across all customers. A custom delivery domain lets you serve it from a subdomain of your own site instead, for example metrics.example.com.

Because the snippet then loads from your own domain, browsers treat it as first-party. That means stronger resistance to ad blockers and more reliable delivery. Nothing else changes: your personalizations, match conditions and reporting all work exactly as before.

Both hosts work in parallel

Adding a custom domain never takes your site offline. Your cdn.adfit.io code and your custom domain both deliver the snippet, so you can switch over at your own pace and there's no downtime.

Before you start

A few things to have ready:

  • A Growth plan or higher. On Free and Starter, the Custom domain section is visible but shows an upgrade prompt instead of the setup form. See Plans & pricing.
  • A subdomain of your site's domain. The custom domain must be a subdomain of the domain you registered for the site. If your site is example.com, use something like metrics.example.com. Root domains and unrelated domains aren't supported.
  • Access to your DNS provider. You'll add one DNS record (a CNAME) wherever you manage your domain's DNS.

You can connect one custom domain per site.

Still being set up?

If custom domains are still being switched on for your account, the Custom domain section shows a short setup notice instead of the add form. This clears on its own once it's ready, so just check back shortly.

Set up your custom domain

  1. Open the Custom domain section

    On the site's detail page, choose Custom domain in the sidebar. This is a separate section from the Snippet tab.

  2. Enter your subdomain

    Type the subdomain you want to use (for example metrics.example.com) and choose Add domain. adfit checks that it's a subdomain of your site's domain, then shows you the DNS record to add.

  3. Add the CNAME record at your DNS provider

    Sign in to your DNS provider and add a new CNAME record with these values:

    • Type: CNAME
    • Name (sometimes called Host): your custom subdomain, for example metrics.example.com
    • Value (sometimes called Target or Points to): the exact target adfit shows you in the Custom domain section. Use the copy button to avoid typos.

    Providers name the fields differently

    Some DNS providers ask only for the subdomain label in the Name field (just metrics rather than the full metrics.example.com). Either way, the record points that subdomain at the target adfit gives you.

  4. Wait for verification

    Once the record is live, adfit verifies it and issues a certificate. The status moves from Pending to Verifying to Active. DNS changes can take anywhere from a few minutes to a while to propagate, and the page updates on its own as the status changes. You can also choose Verify now to re-check straight away.

Screenshot coming soon
The Custom domain section: add your subdomain, copy the CNAME record, and watch the status move to Active.

Understanding the status

The Custom domain section shows a status badge with a short message that tells you what's happening and what to do next.

Pending

You've added your domain and adfit is waiting for the CNAME record to appear at your DNS provider. Add the record from the setup steps, then choose Verify now.

  • Add the CNAME record shown above at your DNS provider, then check again.
  • Your CNAME record points to the wrong target. Update it to the value shown above.

Verifying

adfit found your DNS record and is issuing a TLS certificate for your domain. This usually takes a few minutes, and there's nothing you need to do.

  • DNS looks good. We're issuing the TLS certificate, this can take a few minutes.

Active

Your custom domain is live and ready to serve the snippet. Re-install with the new embed code so the snippet loads from your domain (see the next section).

Failed

Delivery from your custom domain has stopped. There is no automatic fallback, so re-install your cdn.adfit.io code to keep your site personalized while you fix the issue.

  • We lost the connection to your custom domain. We're re-checking automatically, no action needed yet.
  • Your custom domain was disabled after a plan downgrade. Add it again to restore it.
  • This domain is already in use by a verified custom domain.
  • Verification failed. Please remove this domain and add it again.

Re-check any time

You don't have to wait for the automatic check. Choose Verify now to re-run verification right away. To avoid hammering your DNS provider, adfit adds a short cooldown between manual checks.

After it's active: re-install the snippet

Once your custom domain is Active, the section shows a new embed code that loads the snippet from your domain. To start serving first-party, re-install with this new code:

  1. Copy the new embed code

    Under Embed code (custom domain), use the copy button to grab the new snippet.

  2. Replace the old snippet in your head

    Swap the existing snippet in your site's <head> for the new code, then save and re-publish. If you need a refresher on where the snippet goes, see Install the snippet.

No rush, and no downtime

Your existing cdn.adfit.io code keeps working, so both the shared host and your custom domain deliver the snippet while you switch. Just keep the CNAME record in place: if it's removed, delivery from your custom domain stops.

If verification fails or delivery goes down

If the status won't reach Active, or a live custom domain later shows Failed, it's almost always the DNS record. Check the following:

  • The Name and Value of your CNAME record match what adfit shows exactly, with no extra characters or trailing dots.
  • The record has had time to propagate. DNS changes aren't always instant, so give it a few minutes and choose Verify now again.
  • You didn't remove or change the CNAME record after it went Active. adfit needs it to stay in place.

adfit heals itself when your DNS recovers

adfit keeps checking your custom domain in the background. If the connection drops for a transient reason, adfit re-checks automatically and restores delivery once your DNS record and certificate are healthy again. You don't need to remove and re-add the domain.

Restore personalization right away

There's no automatic fallback while a custom domain is down, so your pages show their original content until it recovers. To keep your site personalized immediately, re-install the cdn.adfit.io code from the Snippet section. Then fix the DNS record and verify your custom domain again.