> AI agents: this is one page from PostHog's docs. Full index of Markdown docs for LLMs: https://posthog.com/llms.txt # Set up your domain Canonical URL: https://posthog.com/docs/workflows/domain > **Cloud region:** This page uses US Cloud hosts. For an EU Cloud project, use `https://eu.posthog.com` instead of `https://app.posthog.com` (app host for links). ## On this page - [Add your sender](#add-your-sender) - [The DNS records](#the-dns-records) - [Already sending from this domain?](#already-sending-from-this-domain) - [Troubleshooting](#troubleshooting) - [Verify with your agent](#verify-with-your-agent) PostHog sends email to your users only from a domain you verified. Transactional email, broadcasts, and automations all use the same senders, so you set up your domain once per project. Not ready to touch DNS? The [test sender](https://posthog.com/docs/workflows/email/test-sender.md) lets you send to your own team first. ## Add your sender You need to be a project admin. 1. Go to [**Messaging** > **Channels**](https://app.posthog.com/workflows/channels), click **New channel**, and select **Email**. 2. Enter your domain and pick a **Sending subdomain**. The default is `mail.`, such as `mail.example.com`, which keeps your main domain safe if a campaign lands in spam. You can also pick `send.`, **No subdomain**, or **Custom**. 3. Enter the **Name** and **Email address** that people see in their inbox, and click **Continue**. 4. Add the DNS records that PostHog shows. Pick one: - **Add them to Cloudflare for me** (or Vercel): approve the change once at your DNS host. - **I'll add them myself:** copy each record into your DNS host, such as Route 53 or Namecheap. - **Let an agent do it:** copy a prompt with the exact records, and the checks to run, into your coding agent. ![The email domain wizard's Add 8 settings at Cloudflare step, with the three ways to add the DNS records](https://res.cloudinary.com/dmukukwp6/image/upload/w_1600,c_limit,q_auto,f_auto/domain_wizard_settings_light_8aee5982ac.png) PostHog checks your records while you wait. When all records are in place, the sender shows as **Verified**, and every other sender on the same domain in this project is verified too. ![A verified email sender on the Channels tab](https://res.cloudinary.com/dmukukwp6/image/upload/w_1600,c_limit,q_auto,f_auto/channels_verified_sender_light_e5f0848d36.png) Confirming the records can take up to 72 hours. If the email provider gives up waiting, you see **Verification stopped**. Check the records, then click **Restart verification**. PostHog refuses these senders: - An address on a free or disposable mailbox domain, such as `gmail.com`. - A domain that another organization already verified. - A new domain when your organization already has 3 domains waiting for verification. After you add a sender, you can change its name, its reply-to address, and its custom MAIL FROM subdomain. Its email address stays the same. ## The DNS records Copy each value from PostHog, not from this page. The tokens are unique to your domain. | Record | Type | What it does | | --- | --- | --- | | DKIM (three records) | CNAME | Signs your email, so inboxes can check that it came from your domain. | | SPF | TXT | Lists the servers that can send for your domain. If you already have an SPF record, add `include:amazonses.com` to it instead of adding a second one. | | Custom MAIL FROM, such as `feedback.mail.example.com` | MX and TXT | Sends bounces back to PostHog. | | DMARC | TXT | Tells inboxes what to do with email that fails the checks. PostHog needs one before it verifies the domain. An existing DMARC record counts. | PostHog can also ask for a verification TXT record at `_amazonses`, or an ownership record when another organization already uses the domain. ## Already sending from this domain? Add PostHog's records next to your old provider's. Both can send from the same domain, so you can move one email at a time. See [move from another provider](https://posthog.com/docs/workflows/migrate.md#switch-over-safely). ## Troubleshooting | Problem | Fix | | --- | --- | | Domain still pending | Some DNS hosts, such as Namecheap, add your domain to the end of the name, so `feedback.mail.example.com` becomes `feedback.mail.example.com.example.com`. Enter only the part before your domain. | | Cloudflare records don't verify | Turn off the proxy (gray cloud) for the DKIM CNAME records. | | No address in the **From** menu | Add a sender on the **Channels** tab first. | | Emails go to spam | Check that DKIM, SPF, and DMARC pass, then see [deliverability](https://posthog.com/docs/workflows/email/deliverability.md). | ## Verify with your agent After you add the DNS records, your agent can check the setup for you. It reads the status only and changes nothing: Ask your agentwith the [PostHog MCP](https://posthog.com/docs/workflows/mcp.md)[building-workflows](https://posthog.com/docs/workflows/skills.md) “Check our PostHog Workflows setup status and tell me if our sending domain is verified.” Copy Your domain is ready. Next, read [deliverability](https://posthog.com/docs/workflows/email/deliverability.md) to learn how your sending allowance grows, and how to keep email out of spam. To learn why these records protect your inbox placement, see [email reputation and deliverability](https://posthog.com/docs/workflows/concepts/deliverability-and-reputation.md).