# Set up DNS on DNSimple

If your sending domain's DNS is hosted at DNSimple, connect your DNSimple account and Groundmail writes the domain's SPF, DKIM, DMARC and return-path records for you, then checks them.

---

## Prerequisites

- A Groundmail account with the domain added under [Domains](https://docs.groundmail.dev/domains). A subdomain such as `mail.yourdomain.com` works well.
- The domain, or its parent domain, as a zone in your DNSimple account, using DNSimple's nameservers.

---

## Connect DNSimple

1. In the dashboard, open **Integrations → DNSimple** and click **Connect DNSimple**.
2. DNSimple asks you to pick an account and authorize Groundmail. Click **Authorize**.
3. Open the domain under **Domains**. On its **DNS** tab, click **Apply DNS (DNSimple)**.

Groundmail adds each record to the zone. An existing SPF record gets Groundmail's `include:` added rather than being replaced, and records Groundmail added before are updated in place. When the records are written, Groundmail checks DNS and verifies the domain.

One connection covers one DNSimple account. DNSimple doesn't let apps limit their access to particular zones, so Groundmail only reads and writes records on the domains you apply. **Disconnect** in Groundmail forgets the connection; records already written stay. To remove Groundmail from DNSimple too, revoke it in your DNSimple user settings.

### From the API, CLI or MCP

With DNSimple connected, apply DNS from code with `"provider": "dnsimple"`:

```bash
groundmail domains apply mail.yourdomain.com --provider dnsimple
```

To use your own DNSimple token instead of the connection, set `DNSIMPLE_TOKEN` and `DNSIMPLE_ACCOUNT_ID` before running the CLI; the records are then written from your machine. See [Apply DNS](https://docs.groundmail.dev/api/domains#apply-dns).

### By hand

Open the domain's **DNS** tab in Groundmail and copy each record into DNSimple under **Domains → your domain → DNS → Manage records**.

---

## Troubleshooting

| Problem | Fix |
|---------|-----|
| "No DNSimple DNS zone found" | The domain, or its parent, isn't a zone in the connected DNSimple account. Check the account you picked when connecting. |
| Records are written but the domain doesn't verify | The domain doesn't use DNSimple's nameservers, so the records aren't live. Check the nameservers at your registrar. |
| DNSimple refuses the change | Your DNSimple user needs permission to manage the zone. Ask the account owner, or connect a different account. |
