---
title: How to set up email with your Vercel domain
description: Set up email on your Vercel domain by adding your provider's MX and TXT records in Vercel DNS, and send transactional email from your app with Resend.
url: /kb/guide/set-up-email-with-your-vercel-domain
canonical_url: "https://vercel.com/kb/guide/set-up-email-with-your-vercel-domain"
published: 2026-09-09
last_updated: 2026-09-09
authors: Ben Sabic
related:
  - /docs/functions
  - /docs/domains/managing-dns-records
  - /docs/domains/working-with-domains
  - /docs/domains/troubleshooting
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---

Vercel manages DNS for your domain but doesn't host mailboxes or send and receive email. To use an address like `you@example.com`, you connect a third-party email provider, such as Google Workspace, Zoho Mail, or a forwarding service like ImprovMX, and add its DNS records to your domain in Vercel. This applies to domains purchased through Vercel and to custom domains that use Vercel's nameservers.

The same domain can also send email from your application, such as sign-up confirmations or receipts. Resend, available on the [Vercel Marketplace](https://vercel.com/marketplace), connects directly to your Vercel project, allowing you to send transactional email from your [Vercel Functions](https://vercel.com/docs/functions). In both cases, your email provider handles the mail while Vercel continues to serve your site.

## Overview

In this guide, you'll learn how to:

- Choose an email provider for your domain
  
- Add your provider's records with a DNS preset
  
- Add MX and TXT records manually when your provider isn't listed
  
- Send transactional email from your app with Resend
  
- Verify your setup and troubleshoot missing email
  

## Prerequisites

- **Domain**: Purchased through Vercel or using Vercel's nameservers
  
- **Email provider account**: Google Workspace, Zoho Mail, ImprovMX, Forward Email, or another similar provider
  
- **Dashboard access**: Your team's **Domains** page in the Vercel dashboard
  

If your domain's DNS is managed by another provider (for example, your registrar or Cloudflare), add the email records there instead. Adding a domain to a Vercel project doesn't automatically update its DNS or change its email configuration.

## How it works

When mail servers deliver email to `you@example.com`, they look up your domain's MX records to find out where to send it. If your domain uses Vercel's nameservers, Vercel answers those lookups, so the MX records need to exist in your Vercel DNS zone. Vercel's default records cover your website, not email, which means you add your provider's records yourself.

Most providers require two kinds of records:

- **MX records** route incoming mail to the provider's servers
  
- **TXT records** verify ownership and authorize sending
  

## Steps

### 1\. Choose an email provider

Pick a provider based on what you need:

| Need                                                              | Provider type      | Examples                              |
| ----------------------------------------------------------------- | ------------------ | ------------------------------------- |
| Full mailboxes with inbox, calendar, file storage, and other apps | Hosted email suite | Google Workspace, Zoho Mail, Fastmail |
| Forward mail from your domain to an existing inbox                | Email forwarding   | ImprovMX, Forward Email               |
| Send transactional emails                                         | Email API          | Resend, SendGrid, Postmark            |

Sign up with the provider and follow their setup flow until they give you a list of DNS records to add.

### 2\. Add records with a DNS preset

Vercel includes presets for a few common providers.

1. From your team's dashboard, select **Domains** in the sidebar.
   
2. Select your domain to open its settings.
   
3. Click the **Add DNS Preset** dropdown.
   
4. Select your email provider from the list.
   

The preset adds the provider's MX and TXT records to your domain. After the preset is applied, complete any verification or mailbox activation steps in your provider's dashboard.

For Google Workspace, confirm the records match what Google shows in your Admin console setup flow. Newer setups use a single `smtp.google.com` MX record, while domains configured before 2023 may use the legacy five-record set starting with `ASPMX`. Both configurations remain supported, but mixing them causes routing problems.

### 3\. Add records manually

When your provider isn't in the preset list, add each record it requires through the DNS UI on your domain's settings page. For each MX record, enter:

- **Name**: Leave empty to apply the record to the root domain (`example.com`)
  
- **Type**: `MX`
  
- **Value**: The mail server hostname from your provider
  
- **Priority**: The priority number from your provider (lower numbers are tried first)
  
- **TTL**: The default of 60 seconds works for most setups
  

For example, Fastmail uses two MX records on the root domain:

| Name    | Type | Value                          | Priority |
| ------- | ---- | ------------------------------ | -------- |
| (empty) | MX   | `in1-smtp.messagingengine.com` | 10       |
| (empty) | MX   | `in2-smtp.messagingengine.com` | 20       |

Repeat this for every record your provider lists, and follow the exact values from their documentation. Copy the values carefully, since a typo in the hostname sends your mail nowhere.

Your provider usually also requires a TXT record for domain verification. Add it the same way with **Type** set to `TXT`, leaving **Name** empty for a root-domain record unless your provider specifies a subdomain.

### 4\. Verify your domain with your provider

Return to your provider's dashboard and run their verification check. Providers confirm ownership by looking up the TXT record you added, then activate mail delivery for your domain. Once verification passes, complete any mailbox activation step your provider requires. Google Workspace, for example, requires activating Gmail in the Admin console after verification.

DNS changes typically take effect within minutes, but full propagation can take up to 24 hours, and Google allows up to 72 hours for new MX records to be recognized. If verification fails immediately after adding records, wait 10 to 15 minutes and retry.

### 5\. Confirm your records resolve

Check that your MX records are live from your terminal:

```bash
dig MX example.com +short
```

You should see your provider's mail servers with their priorities:

```bash
10 in1-smtp.messagingengine.com.
20 in2-smtp.messagingengine.com.
```

Then send a test email from an external account, such as a personal Gmail address, to an address on your domain. If it doesn't arrive within a few minutes, check the spam folder before assuming the records are wrong.

## Sending email from your application

Mailboxes and application email are separate problems. The steps above set up an inbox for reading and writing mail at your domain. If your app needs to send email programmatically, such as sign-up confirmations, receipts, or notifications, use an email API instead of a mailbox provider.

Resend is available on the Vercel Marketplace, which means you can provision an account and connect it to your project without leaving Vercel.

Other email APIs, such as SendGrid or Postmark, follow the same overall pattern: verify your domain by adding their DNS records, store an API key as an environment variable, and send from your Vercel Functions.

### 1\. Install Resend from the Vercel Marketplace

1. Open the [Resend page on the Vercel Marketplace](https://vercel.com/marketplace/resend).
   
2. Click **Install** and select the Vercel project you want to connect.
   
3. Follow the prompts to create a Resend account or link an existing one.
   

The integration creates a Resend API key and stores it as the `RESEND_API_KEY` environment variable on your project, so you don't copy secrets between dashboards. You can also install it from the Vercel CLI.

### 2\. Verify your sending domain

By default, Resend only lets you send from `onboarding@resend.dev` to your own account email. To send from your domain to real recipients:

1. In the Resend dashboard, go to **Domains** and add your domain.
   
2. Resend generates the records it needs on a dedicated sending subdomain, `send.your_domain_here.com` by default: an SPF `TXT` record, an MX record for bounce handling, and a DKIM record. Copy the exact values from your Resend dashboard, since they're unique to your domain and region.
   
3. Add those records to your domain in the Vercel DNS UI, the same way you added MX records in the steps above, entering the subdomain (for example, `send`) in the **Name** field where Resend specifies one.
   
4. Return to Resend and run the verification check.
   

If you installed Resend through the Marketplace with a domain purchased in Vercel, the setup flow prompts you to select that domain during installation, which streamlines this step.

### 3\. Send an email from a Vercel Function

Install the SDK in your project:

```bash
pnpm i resend
```

Then create a route handler that sends an email:

**Next.js**

```typescript
import { Resend } from 'resend';

const resend = new Resend(process.env.RESEND_API_KEY);

export async function POST() {

  const { data, error } = await resend.emails.send({
    from: 'Acme <hello@your_domain_here.com>',
    to: ['recipient@example.com'],
    subject: 'Hello from Vercel',
    html: '<p>Your first email sent from a Vercel Function.</p>',
  });

  if (error) {
    return Response.json({ error }, { status: 500 });
  }

  return Response.json(data);
}
```

**Nuxt**

```typescript
import { Resend } from 'resend';

const resend = new Resend(process.env.RESEND_API_KEY);

export default defineEventHandler(async () => {

  const { data, error } = await resend.emails.send({
    from: 'Acme <hello@your_domain_here.com>',
    to: ['recipient@example.com'],
    subject: 'Hello from Vercel',
    html: '<p>Your first email sent from a Vercel Function.</p>',
  });

  if (error) {
    throw createError({
      statusCode: 500,
      message: 'Error sending email',
    });
  }

  return data;
});
```

Replace the `from` address with an address on your verified domain. Deploy, then test the endpoint:

```bash
curl -X POST https://your-project.vercel.app/api/send
```

Successful requests return the email's ID:

```json
{ "id": "your_email_id_here" }
```

Resend also integrates with [React Email](https://react.email/), so you can build templates as React components and pass them to `resend.emails.send` with the `react` parameter.

### Running mailboxes and an email API together

You can run both on the same domain. Resend's records live on a sending subdomain, so they don't collide with your mailbox provider's root-domain MX and SPF records, and there's nothing to merge.

The merge rule applies when two services need SPF on the same name. Each domain or subdomain can hold only one SPF record, so if a second sender requires a root-domain SPF record alongside your mailbox provider's (for example, SendGrid with a custom Return-Path on the root, or an SMTP relay), combine the values into a single `TXT` record:

```plaintext
v=spf1 include:spf.messagingengine.com include:your_provider_spf_here ~all
```

## Troubleshooting

### Email stopped working after adding your domain to Vercel

Switching your domain's nameservers to Vercel replaces the DNS records your registrar was serving, including any existing MX records. Your mail provider's configuration hasn't changed, but mail servers can no longer find it. Re-add your provider's MX and TXT records through the Vercel DNS UI using the steps above.

### Mail arrives but sending fails or lands in spam

Receiving only needs MX records, but sending reliably requires SPF and DKIM. Check your provider's documentation for their SPF `TXT` record (it starts with `v=spf1`) and DKIM records, and add them to your domain in Vercel. Each name can hold only one SPF record, so if multiple services need SPF at the same name, merge their values into a single record.

### You can't add records to the domain

Adding DNS records requires access to the team that owns the domain. If the Vercel CLI returns a permissions error, confirm you're operating in the correct scope with `vercel switch` and that your role on the team allows domain management.

### Records still aren't resolving after 24 hours

Confirm the domain actually uses Vercel's nameservers by running `dig NS example.com +short`. If the response shows a different provider, add the email records there instead of in Vercel.

## Frequently asked questions

### Does Vercel provide email hosting?

No. Vercel manages DNS for your domain but doesn't host mailboxes or send and receive email. To use an address on your domain, connect a third-party provider such as Google Workspace, Zoho Mail, or ImprovMX and add its MX and TXT records to your domain in Vercel.

### Why did my email stop working after I added my domain to Vercel?

Switching your domain's nameservers to Vercel replaces the DNS records your registrar was serving, including your mail provider's MX records. Vercel's default records cover your website, not email, so mail servers can no longer find where to deliver. Re-add your provider's MX and TXT records through the Vercel DNS UI to restore delivery.

### Which DNS records do I need to receive email on my domain?

Receiving email requires MX records pointing to your provider's mail servers, and most providers also require a TXT record for domain verification. Sending reliably requires SPF and DKIM TXT records on top of that. If your domain uses Vercel's nameservers, add all of these records in the Vercel DNS UI.

### How long does it take for email DNS records to work?

DNS records added in Vercel typically take effect within minutes, but full propagation can take up to 24 hours. Some providers allow more time, and Google recommends waiting up to 72 hours for new MX records to be recognized. If verification fails immediately after you add records, wait 10 to 15 minutes and retry before making any changes.

### Can I send email from my Vercel application?

Yes. Use an email API such as Resend, which is available on the Vercel Marketplace and stores its API key as the `RESEND_API_KEY` environment variable on your project. After verifying your sending domain in the Resend dashboard, call the API from a Vercel Function to send transactional email such as sign-up confirmations.

## Next steps

- Review all record types Vercel supports in [Managing DNS Records](https://vercel.com/docs/domains/managing-dns-records)
  
- Learn how domains and DNS work together in [Working with domains](https://vercel.com/docs/domains/working-with-domains)
  
- Resolve other domain issues with the [domain troubleshooting guide](https://vercel.com/docs/domains/troubleshooting)
  
- Send transactional email from your app with [Resend on the Vercel Marketplace](https://vercel.com/marketplace/resend)