How to set up SPF, DKIM, DMARC and a custom domain in Mailrelay, step by step

The DNS records you need to authenticate your emails, where to add them and how to check they work.

Jose Argudo , CMO @ Mailrelay

Setting up SPF, DKIM, DMARC and a custom domain is what lets Gmail, Outlook or Yahoo verify that your emails really come from you. Without these records, your campaigns are more likely to end up in the spam folder.

In this guide you’ll see which record to add to your domain’s DNS for each one, where to enable it in Mailrelay and how to check that it works. These are the same steps explained in our help article.

Set up your authentication in just a few minutes

Follow this step-by-step guide to get your SPF, domain and DKIM ready in Mailrelay.

What you need before you start

  • Your own domain (for example, yourcompany.com). You can’t authenticate a Gmail or Outlook address.
  • Access to your domain’s DNS panel, or to your hosting provider so they can do it for you.
  • About 15 minutes. DNS changes can take a few hours to take effect.

Here’s a summary of the four records:

RecordTypeName (host)Value
SPFTXTyourdomain.comv=spf1 a mx include:spf.ipzmarketing.com -all
Custom domainCNAMEnewsletter.yourdomain.com (whichever you choose)yourdomain.ipzmarketing.com
DKIMCNAMEipz._domainkey.yourdomain.comdkim.ipzmarketing.com.
DMARCTXT_dmarc.yourdomain.comv=DMARC1; p=none;

Step 1: set up SPF

SPF is a DNS record that specifies which servers can send emails on behalf of your domain. This way, spam filters know that Mailrelay sends with your permission and don’t mistake you for someone spoofing your address.

Which record to add

Go to your domain’s DNS panel, or ask your hosting provider to do it:

  • If you already have an SPF record (a TXT record starting with v=spf1), add this include right after v=spf1: include:spf.ipzmarketing.com
  • If you don’t have one, create this full TXT record: v=spf1 a mx include:spf.ipzmarketing.com -all

A domain can only have one SPF record. If you create a second one, both stop working.

What the “-all” at the end means

It tells servers what to do with emails coming from an unauthorized IP:

  • -all: only authorized IPs can send with your domain. This is the recommended option.
  • ~all: emails from other servers are accepted, but flagged as suspicious.
  • ?all or +all: SPF no longer protects you.
What is a custom domain?

Step 2: set up a custom domain

A custom domain replaces Mailrelay’s generic domain in the tracking links and images of your emails with one of your own. It will look something like newsletter.yourdomain.com, and your reputation will depend only on your own sending.

Which record to add

  1. Choose a subdomain, for example newsletter.yourdomain.com or news.yourdomain.com.
  2. In the DNS panel, create a CNAME record for that subdomain.
  3. Point it to: tudominio.ipzmarketing.com

How to add it in Mailrelay

  1. In your account, go to Settings > Custom domains and click Add.
Option to add a custom domain in the Mailrelay account
  1. Enter the subdomain you created, without http:// or https://.
  2. Once it’s created, mark it as active so Mailrelay starts using it.
What is a DKIM record?

Don’t have a Mailrelay account yet?

Create your free account and set up your sending domain with SPF and DKIM from day one.

Step 3: set up DKIM

DKIM adds an encrypted signature to every email. The receiving server checks it, so it knows the message comes from your domain and that nobody has altered it along the way.

Which record to add

In the DNS panel, create a CNAME record:

  • Name: ipz._domainkey.tudominio.com (replace yourdomain.com with your domain).
  • Points to: dkim.ipzmarketing.com. (including the trailing dot).

If your DNS provider gives an error with the trailing dot, try without it.

Step 4: set up DMARC

DMARC tells servers what to do with emails from your domain that fail the SPF or DKIM checks.

Which record to add

Create a TXT record in your DNS:

  • Name: _dmarc.tudominio.com
  • Value: v=DMARC1; p=none;

With p=none, servers don’t block anything: they just monitor. It’s the safe way to start. Later on, once everything is working, you can tighten the policy.

How to check everything is correct

In your Mailrelay account

Go to Settings > Email authentication and enter your domain. The panel tells you whether SPF, the custom domain, DKIM and DMARC are set up correctly.

In a test email

  1. Send a test newsletter to a Gmail address.
  2. Open it, click the three dots at the top right and choose Show original.
Check SPF and DKIM
  1. You’ll see the message headers. If PASS appears next to SPF and DKIM, they’re correct. If FAIL appears, check that record.
SPF and DKIM check

For the custom domain, you can also use the MxToolbox CNAME lookup: enter your subdomain and click “CNAME Lookup”.

If something doesn’t add up, contact us through any of our support channels and we’ll help you check it.

Frequently Asked Questions

How long do DNS changes take to apply?

It’s usually a matter of minutes or a few hours, but some providers take up to 24-48 hours. If the panel doesn’t detect them yet, wait a little and check again.

Can I have two SPF records on the same domain?

No. If you already use SPF for other services, such as your business email, add include:spf.ipzmarketing.com to your existing record.

Is setting up DMARC mandatory?

Since 2024, Gmail and Yahoo have required it from anyone sending more than 5,000 emails a day to their users. Even if you send fewer, it’s worth having: with p=none it doesn’t block anything and it makes your domain more trustworthy.

What happens if I don’t set up a custom domain?

Your emails are still sent, but the links and images use a generic domain. With your own subdomain, the reputation of your sending depends only on you.

Do I need to set all this up with the free account?

Yes, and it’s recommended. Authentication doesn’t depend on your plan: it depends on your domain. Doing it from your first send helps you reach the inbox.

Setting up these records correctly improves your inbox placement rate. And if you also send through an SMTP relay server or smarthost, it’s just as important. To learn more, read our posts on sending domains and deliverability.

Send with maximum deliverability

With the right setup, your campaigns will always reach the inbox. Get started with Mailrelay.

Jose Argudo, CMO at Mailrelay

Jose Argudo

CMO at Mailrelay. Writes about email marketing, copywriting, and conversion for small businesses and entrepreneurs.

More articles by Jose · LinkedIn