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

# Give Sapt Cloudflare DNS access

> If your domain's DNS is on Cloudflare, give Sapt a DNS token so it can add the records your website and email need. Sapt never deletes records.

If your domain uses Cloudflare for DNS, you can let Sapt add the DNS records for you instead of typing them in yourself.

## What you get

* Sapt adds the records your domain needs, for your website, tracking and email, when you click **Apply DNS records**.
* One token covers every domain the token can see in your Cloudflare account.

## Before you start

* Your domain's DNS on Cloudflare. Sapt shows the Cloudflare option only for a domain whose DNS is there.
* A Cloudflare login that can make API tokens.
* Permission to change Project Settings in Sapt.

## Connect Cloudflare

<Steps>
  <Step title="Add your domain in Sapt">
    In Sapt, open **Project Settings** and then **Domains**. In **Connect a domain**, type your domain in **Domain you own**, tick what it is for and click **Save domain settings**. [Connect your domain](/docs/mintlify/website/connect-your-domain) has each step.

    <Frame>
      <img src="https://mintcdn.com/sapt/uTSH2FdHG3EzpkYv/docs/mintlify/images/website/domains.webp?fit=max&auto=format&n=uTSH2FdHG3EzpkYv&q=85&s=8853f0c8523f71112d31673c8f0c40ef" alt="Domains in Project Settings with the empty Connect a domain card: Domain you own, Website, Email sending, First-party tracking and Save domain settings" width="1512" height="794" data-path="docs/mintlify/images/website/domains.webp" />
    </Frame>
  </Step>

  <Step title="Click Connect Cloudflare DNS access">
    Once your domain is saved, Sapt checks where its DNS is. If it is on Cloudflare, **Connect Cloudflare DNS access** shows under your domain's **DNS records**. Click it.
  </Step>

  <Step title="Open Cloudflare">
    Click **Open Cloudflare**. Cloudflare's token page opens with everything filled in: the name **Sapt**, read access to your zones, edit access to your DNS records, and all of your zones. Sign in if Cloudflare asks.

    <Tip>
      To limit the token to one domain, pick that domain in the token's resources instead of all zones.
    </Tip>
  </Step>

  <Step title="Create the token">
    Click **Continue to summary**, check it, then click **Create Token**. Copy the token. Cloudflare shows it only once. Cloudflare's steps are in its [API token guide](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/).
  </Step>

  <Step title="Paste it into Sapt">
    Back in Sapt, paste the token into **Paste the token** and click **Connect**. Sapt checks the token with Cloudflare and makes sure it can see your domain.
  </Step>

  <Step title="Apply the records">
    Look over the records, then click **Apply DNS records**. Click **Check connection** to see which records are live.
  </Step>
</Steps>

## What Sapt does and does not do

* Connecting changes nothing. Sapt adds records only when you click **Apply DNS records**.
* Sapt only adds records that are missing. It never replaces or deletes a record that is already there. If a name already has a different record, Sapt tells you and leaves it alone.
* Sapt adds records with the Cloudflare proxy off. If a matching record has the proxy on, Sapt asks you to turn the proxy off.
* **Check connection** only looks. It never changes anything at Cloudflare.

## If something looks wrong

* Sapt says Cloudflare did not accept the token: copy it again from the page Cloudflare shows after **Create Token**, and paste it again.
* Sapt says the token cannot see your domain: make a new token that includes the domain's zone, or give the old one access to it in Cloudflare.

## Disconnect

In **Project Settings** > **Domains**, click **Disconnect DNS access**. Sapt forgets the token. Records it already added stay.

Then delete the token in Cloudflare under **My Profile** > **API Tokens**.

## Keep going

<CardGroup cols={2}>
  <Card title="Connect your domain" href="/docs/mintlify/website/connect-your-domain">
    Put your website on your own address.
  </Card>

  <Card title="All integrations" href="/docs/mintlify/integrations/overview">
    See what else you can connect.
  </Card>
</CardGroup>


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