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

# Domain Verification

> Learn how to verify your sending domain for better email deliverability. Domain verification enables DKIM signing and improves inbox placement.

## Why Verify Your Domain?

All plans include **unlimited domains** — add as many sending domains as you need at no extra cost.

<CardGroup cols={2}>
  <Card title="Better Deliverability" icon="shield-check">
    DKIM signing proves email authenticity
  </Card>

  <Card title="Custom Sender" icon="envelope">
    Send from your own domain address
  </Card>

  <Card title="Brand Trust" icon="globe">
    Recipients see your domain, not ours
  </Card>

  <Card title="No Spam Warnings" icon="circle-check">
    Avoid "via unosend.co" labels
  </Card>
</CardGroup>

## Setup Guide

<Steps>
  <Step title="Add Your Domain">
    Add your domain to Unosend through the dashboard or API:

    <CodeGroup>
      ```bash cURL theme={null}
      curl -X POST https://api.unosend.co/domains \
        -H "Authorization: Bearer un_your_api_key" \
        -H "Content-Type: application/json" \
        -d '{
          "domain": "yourdomain.com"
        }'
      ```

      ```javascript JavaScript theme={null}
      await fetch('https://api.unosend.co/domains', {
        method: 'POST',
        headers: {
          'Authorization': 'Bearer un_your_api_key',
          'Content-Type': 'application/json'
        },
        body: JSON.stringify({ domain: 'yourdomain.com' })
      });
      ```

      ```python Python theme={null}
      import requests

      requests.post('https://api.unosend.co/domains',
        headers={'Authorization': 'Bearer un_your_api_key'},
        json={'domain': 'yourdomain.com'}
      )
      ```
    </CodeGroup>

    ### Response

    ```json response.json theme={null}
    {
      "id": "dom_xxxxxxxxxxxxxxxx",
      "domain": "yourdomain.com",
      "status": "pending",
      "dns_records": [
        {
          "type": "TXT",
          "name": "xxxxxxxx._domainkey.yourdomain.com",
          "value": "k=rsa; p=MIGfMA0GCSqGSIb3..."
        },
        {
          "type": "CNAME",
          "name": "bounce-mail.yourdomain.com",
          "value": "cname.unosend.co"
        }
      ],
      "created_at": "2024-01-15T10:30:00Z"
    }
    ```
  </Step>

  <Step title="Configure DNS Records">
    Add the following **2 DNS records** to your domain. Go to your DNS provider (Cloudflare, Route53, GoDaddy, etc.) and add these records:

    ### 1. DKIM Record (TXT)

    Authenticates your emails with a DKIM signature:

    | Field     | Value                                                 |
    | --------- | ----------------------------------------------------- |
    | Type      | `TXT`                                                 |
    | Name/Host | `xxxxxxxx._domainkey` (provided in response)          |
    | Value     | `k=rsa; p=MIGfMA0GCSqGSIb3...` (provided in response) |
    | TTL       | 3600 (or Auto)                                        |

    <Note>
      The DKIM record name and value are unique to your domain. Copy them exactly from the API response or dashboard.
    </Note>

    ### 2. CNAME Record (Bounce Handling)

    This enables bounce handling through Unosend's infrastructure:

    | Field     | Value              |
    | --------- | ------------------ |
    | Type      | `CNAME`            |
    | Name/Host | `bounce-mail`      |
    | Value     | `cname.unosend.co` |
    | TTL       | 3600 (or Auto)     |

    <Tip>
      **Just 2 records!** A DKIM TXT record and a CNAME for bounce handling. That's all you need.
    </Tip>
  </Step>

  <Step title="Verify Your Domain">
    After adding DNS records, trigger verification. DNS propagation can take up to 48 hours, but usually completes within a few minutes.

    ```bash cURL theme={null}
    curl -X POST https://api.unosend.co/domains/dom_xxxxxxxx/verify \
      -H "Authorization: Bearer un_your_api_key"
    ```

    ### Response

    ```json response.json theme={null}
    {
      "id": "dom_xxxxxxxxxxxxxxxx",
      "domain": "yourdomain.com",
      "status": "verified",
      "verified_at": "2024-01-15T10:35:00Z"
    }
    ```
  </Step>
</Steps>

## DNS Record Summary

Here's a quick reference for all required records:

| Type  | Name                  | Value                              |
| ----- | --------------------- | ---------------------------------- |
| TXT   | `xxxxxxxx._domainkey` | `k=rsa; p=...` (unique per domain) |
| CNAME | `bounce-mail`         | `cname.unosend.co`                 |

## Provider-Specific Instructions

<AccordionGroup>
  <Accordion title="Cloudflare">
    1. Go to your domain in Cloudflare dashboard
    2. Click **DNS** in the sidebar
    3. Click **Add record** for each record:
       * For TXT: Select TXT, enter the `_domainkey` name and DKIM value
       * For CNAME: Select CNAME, enter `bounce-mail` as name, `cname.unosend.co` as value
    4. Set proxy status to **DNS only** (gray cloud) for the CNAME record
  </Accordion>

  <Accordion title="AWS Route 53">
    1. Open Route 53 console
    2. Select your hosted zone
    3. Click **Create record** for each entry:
       * TXT record: Simple routing, enter `_domainkey` name and value in quotes
       * CNAME record: Simple routing, enter `bounce-mail` as name, `cname.unosend.co` as value
  </Accordion>

  <Accordion title="GoDaddy">
    1. Go to your domain's DNS Management
    2. Click **Add** in the Records section
    3. For TXT record:
       * Type: TXT
       * Name: the `_domainkey` value
       * Value: the DKIM key
    4. For CNAME record:
       * Type: CNAME
       * Name: `bounce-mail`
       * Value: `cname.unosend.co`
  </Accordion>

  <Accordion title="Namecheap">
    1. Go to Domain List → Manage → Advanced DNS
    2. Click **Add New Record** for each entry
    3. For TXT record: Select TXT Record, enter `_domainkey` name and value
    4. For CNAME record: Select CNAME Record, enter `bounce-mail` and target
  </Accordion>

  <Accordion title="Google Domains / Squarespace">
    1. Go to DNS settings for your domain
    2. Click **Manage custom records**
    3. Add each record with the correct type and values
  </Accordion>
</AccordionGroup>

## Verification Complete!

<Info>
  Once verified, you can start sending emails from your domain. Your emails will be:

  * **DKIM-signed** with your unique key
  * **Delivered via Unosend's dedicated infrastructure** for maximum deliverability
  * **Bounce-tracked** automatically
</Info>

## Sending Emails

After verification, send emails from any address at your domain:

```bash theme={null}
curl -X POST https://api.unosend.co/emails \
  -H "Authorization: Bearer un_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "hello@yourdomain.com",
    "to": "recipient@example.com",
    "subject": "Hello from my verified domain!",
    "html": "<p>This email is DKIM-signed and delivered via Unosend.</p>"
  }'
```
