Back to blog
Email DomainDNSTutorialEmail Setup

What Is an Email Domain? How to Set Up Your Own

Learn what an email domain is, why you need a custom one, and how to set it up step by step. Covers domain registration, DNS records, email authentication, and connecting to an email service.

SendPigeon TeamFebruary 10, 20268 min read

An email domain is the part after the @ in an email address. In hello@example.com, the email domain is example.com. This guide covers everything from registering a domain to sending your first email from it.

TL;DR

To set up a custom email domain:

  1. Register a domain (~$10-15/year for .com)
  2. Add DNS records (SPF, DKIM, DMARC) for authentication
  3. Connect an email service for sending
  4. Verify everything works with a test email

Time: 15-30 minutes of setup. DNS propagation can take up to 48 hours.


What Is an Email Domain?

Every email address has two parts:

hello @ example.com
  ↑         ↑
local    email domain
part

The email domain tells email servers where to route the message. When someone sends email to hello@example.com, their email server looks up the DNS records for example.com to find which server handles its email.

Free email services give you a shared domain — @gmail.com, @outlook.com, @yahoo.com. A custom email domain means you own the @yourdomain.com part.


Why Use a Custom Email Domain?

Credibility

Emails from hello@yourcompany.com look professional. Emails from yourcompany.noreply@gmail.com look like spam.

Deliverability

Custom domains let you set up email authentication (SPF, DKIM, DMARC). Without these, email providers flag your messages as suspicious. Most email APIs require a verified custom domain for production sending.

Control

You own your domain. If you switch email providers, your addresses stay the same. If Gmail changes their policies, it doesn't affect your sending.

Branding

Every email you send reinforces your brand. support@yourapp.com builds recognition. yourappname123@gmail.com doesn't.


Step 1: Register a Domain

If you don't already have a domain, register one. Popular registrars:

Registrar.com PriceDNS Management
Cloudflare~$10/yearExcellent (free)
Namecheap~$10/yearGood
Porkbun~$10/yearGood
Squarespace Domains~$12/yearGood

If you already have a domain for your website, use it. No need to buy a separate one — the same domain works for both web and email.

Choosing a domain name

  • Use your company or product name
  • Prefer .com — it's the most trusted TLD for email
  • Avoid hyphens and numbers if possible
  • Keep it short and easy to spell

Step 2: Set Up DNS Records for Email

DNS records tell the internet how to handle email for your domain. You need four types:

MX Records (for receiving email)

MX (Mail Exchange) records tell other servers where to deliver email sent to your domain. If you want to receive email (not just send), add MX records pointing to your email provider:

Type: MX
Host: @
Value: mx1.yourprovider.com
Priority: 10

If you only need to send transactional email (not receive), you can skip MX records. Email API services like SendPigeon handle sending without MX records.

SPF Record (who can send for you)

SPF (Sender Policy Framework) lists which servers are authorized to send email from your domain:

Type: TXT
Host: @
Value: v=spf1 include:sendpigeon.com ~all

This tells receiving servers: "Only servers listed by sendpigeon.com are authorized to send email from this domain."

DKIM Record (email signature)

DKIM (DomainKeys Identified Mail) adds a cryptographic signature to your emails, proving they weren't tampered with in transit. Your email provider gives you the DKIM record to add:

Type: TXT
Host: sp._domainkey
Value: v=DKIM1; k=rsa; p=MIGfMA0GCS... (your provider gives you this)

DMARC Record (policy for failures)

DMARC tells receiving servers what to do when SPF or DKIM checks fail:

Type: TXT
Host: _dmarc
Value: v=DMARC1; p=quarantine; rua=mailto:dmarc@yourdomain.com
PolicyWhat it does
p=noneMonitor only — no action on failures
p=quarantineSend failures to spam
p=rejectBlock failures entirely

Start with p=quarantine and move to p=reject once you've verified everything works.

All three records (SPF, DKIM, DMARC) work together. Missing any one weakens the whole system. See our complete DKIM, SPF, and DMARC guide for the full explanation.


Step 3: Connect an Email Service

With DNS records in place, connect an email service to start sending. Here's how with SendPigeon:

1. Add your domain

Sign up at app.sendpigeon.com and add your domain in the dashboard. SendPigeon provides the exact DNS records to add.

2. Verify DNS records

After adding the records, click Verify in the dashboard. SendPigeon checks that SPF, DKIM, and DMARC are configured correctly.

3. Send your first email

import { SendPigeon } from "sendpigeon";

const pigeon = new SendPigeon(process.env.SENDPIGEON_API_KEY!);

const { data, error } = await pigeon.send({
  from: "hello@yourdomain.com",
  to: "your-email@gmail.com",
  subject: "My first email from my domain!",
  html: "<h1>It works!</h1><p>Email sent from my own domain.</p>",
});

if (error) {
  console.error("Failed:", error.message);
} else {
  console.log("Sent:", data.id);
}

See our how to send a test email guide for more testing options.


Using a Subdomain for Sending

Many teams send transactional email from a subdomain like mail.example.com or notifications.example.com instead of the root domain. This is a good practice because:

  • Reputation isolation — If your transactional email reputation takes a hit, your main domain isn't affected
  • Separate tracking — Easier to monitor deliverability per email type
  • Cleaner setup — Avoids DNS conflicts with existing email infrastructure

Set up a subdomain the same way — just add DNS records for the subdomain instead of the root:

Type: TXT
Host: mail            (instead of @)
Value: v=spf1 include:sendpigeon.com ~all

Common Mistakes

Sending from a free email domain

Using @gmail.com or @outlook.com as your from address in an email API won't work. These providers have strict DMARC policies that block third-party sending. Always use a domain you own.

Missing DKIM or DMARC

SPF alone isn't enough. Gmail, Outlook, and Yahoo all require DKIM and DMARC for reliable delivery. If your emails land in spam, missing authentication records are the most likely cause.

Multiple SPF records

A domain can only have one SPF record. If you use multiple email services, combine them into a single record:

v=spf1 include:sendpigeon.com include:_spf.google.com ~all

Not warming up a new domain

New domains have no sending reputation. If you start sending thousands of emails immediately, providers will flag you as suspicious. Warm up your domain gradually.


Frequently Asked Questions

What is an email domain?

An email domain is the part after the @ in an email address. In hello@example.com, the domain is example.com. It tells email servers where to route messages.

How do I create a custom email domain?

Register a domain name through a registrar (Cloudflare, Namecheap, Porkbun — typically $10-15/year for .com). Then add DNS records (SPF, DKIM, DMARC) to authenticate your domain with an email service.

Can I get an email domain for free?

The domain itself costs money ($10-15/year). But many email services offer free tiers — SendPigeon includes 3,000 free emails per month. So the ongoing cost is just the domain registration.

What DNS records do I need?

For sending: SPF, DKIM, and DMARC records (all TXT records). For receiving: MX records. Your email provider gives you the exact values to add.

How long does it take to set up?

About 15-30 minutes of active work. DNS propagation can take up to 48 hours but usually completes within minutes.

Can I use my domain for both sending and receiving?

Yes. MX records handle inbound email (you can use Gmail, Outlook, or any provider). SPF/DKIM handle outbound sending through your email API. They work independently on the same domain.

What is the difference between an email domain and a web domain?

They're the same domain — different DNS records. Your web domain uses A/CNAME records to serve your website. Your email domain uses MX, SPF, DKIM, and DMARC records to handle email. Both coexist on one domain.

Do I need a separate domain for sending?

Not required, but recommended for transactional email. Using a subdomain like mail.yourdomain.com isolates your sending reputation from your main domain.


Next Steps