Resend Setup Guide: API Key, Domain Verification & First Email
Send your first transactional email in five minutes with Resend. Domain verification takes the longest - here's how to do it right.

👁 116 reads
Resend is a service for sending emails from your application: registrations, password resets, order confirmations, notifications. You’ll send your first email in five minutes, and domain verification takes longer than the code. This tutorial walks through the complete setup following Resend’s official documentation.
Before You Start: DNS Access
The most common blocker when starting with Resend isn’t code - it’s lack of access to your domain’s DNS settings. Before you begin, check where your domain is managed and whether you have permission to add records. If someone else manages the domain, like an agency or IT department, request access or prepare to send them the list of records from the Resend panel.
Also decide right away which address your emails will come from, for example notifications@ on a sending subdomain.
Step 1. API Key
After creating your account, you generate an API key in the panel. Store the key in an environment variable on your server, for example in your application’s settings file, not in your code. The documentation and tutorials emphasize this strongly: a key in browser code is public, and anyone who reads it can send emails on behalf of your domain.
Step 2. Library and First Email
Install the official library for your language, for example for Node.js via npm. You send your first email with a single call containing sender, recipient, subject and HTML content. For testing, you can send from Resend’s test address without configuring a domain.
Here’s a trap many people fall into: from the test address, email will only reach your account’s address. Sending to anyone else before domain verification ends with an error that looks cryptic on day one.
Step 3. Domain Verification
To send from your own address, you add a domain in the Resend panel. In the records tab you get entries to add at your DNS provider: SPF and DKIM records plus a bounce record. Copy them exactly, preferably with copy-paste, because one typo blocks verification.
Three practical notes from the documentation:
- Resend recommends a separate subdomain for sending, for example send, instead of your main domain,
- with Cloudflare, disable proxying for CNAME records, otherwise verification won’t complete,
- propagation can take up to a day, and warnings about missing records during this time are normal.
DMARC isn’t required for verification, but it’s worth adding because it improves your emails’ credibility.
Step 4. Templates in React Email
Resend was created by the same team that created React Email, so it’s the recommended way to build templates. You write an email like a component, with parameters like customer name and product name, and pass it in the send call. Resend converts it to HTML automatically.
Step 5. Delivery Preview
In the panel you see every sent message and its status: delivered, rejected, marked as spam. When you have delivery problems, this is the first place you look. Deliverability also depends on domain configuration and the receiving server’s rules, so correct DNS records are essential.
Example: Welcome Email in Your App
Your app needs to send a welcome email after registration. You create a key, store it in a server variable, test sending from the test address to your own address. You add the send subdomain in the panel, paste the records at your DNS provider and wait for verification. You write the welcome template in React Email with the user’s name and a link to getting started. After verification, you change the sender to your own address.
In this example, the order matters. First test from the test address to your own inbox, then verify the domain, finally change the sender. This lets you write and test code before DNS records propagate, and switching to your own address is one configuration change. It’s also worth immediately sending the welcome email to several different inboxes and checking that it looks good on mobile too.
Most Common Mistakes
- API key in browser code.
- Testing sends to other people before domain verification.
- Typos in DNS records.
- Cloudflare proxying enabled for verification records.
How to Check Everything Works
After domain verification, send test emails to several different inboxes: Gmail, Outlook, a corporate inbox. Check that they land in the inbox, not spam, and that they look good on mobile. In the Resend panel you’ll see the status of each message.
For the first few days after deployment, check the panel daily. Rejected emails and spam reports caught early are easy to fix, and ignored ones damage your domain’s reputation.
Once basic emails work, it’s worth adding a separate template for each type of message, instead of one universal template. A password reset email and an order confirmation have different purposes, and separate templates are easier to improve and test.
More on this from QUANTSLANT
guides·Check Who’s Logged Into Your WhatsApp - 3 Minutes to See All SessionsWhatsApp lets you see every device connected to your account and log them all out in one tap. Here's how to spot suspicious sessions and secure your account.

