How to add DNS records for email at your registrar
Last updated: 25:10:2026
Before you start: where is your DNS hosted?
The company you bought the domain from (the registrar) and the company that answers DNS queries for it can be different. Records only take effect at the provider your domain's nameservers point to. Check with dig NS example.com +short (or nslookup -type=NS example.com): names like *.ns.cloudflare.com mean you edit records at Cloudflare even if you bought the domain elsewhere. Editing a zone at a provider that isn't authoritative is the most common reason "I added the record but nothing changed".
The records email needs
A typical setup for a mail provider looks like the table below. The values are examples - always copy the exact values your provider shows you (AnyMail lists them on the mail server's DNS setup page).
| Type | Host / name | Value (example) |
|---|---|---|
| MX | @ | 10 mx.mailprovider.example. |
| TXT (SPF) | @ | v=spf1 include:mailprovider.example ~all |
| TXT (DKIM) | selector._domainkey | v=DKIM1; k=rsa; p=MIIBIjANBg... |
| TXT (DMARC) | _dmarc | v=DMARC1; p=quarantine |
| TXT (verification) | as shown by the provider | a unique token proving you control the domain |
@10 mx.mailprovider.example.@v=spf1 include:mailprovider.example ~allselector._domainkeyv=DKIM1; k=rsa; p=MIIBIjANBg..._dmarcv=DMARC1; p=quarantineBackground on each record: SPF, DKIM and DMARC. Note that mail doesn't need your domain's A or AAAA records - your website can stay exactly where it is.
Generic steps (any DNS provider)
- Sign in to the provider that hosts your DNS and open the domain's DNS zone (often called "DNS records", "DNS zone" or "Manage DNS").
- Choose "Add record" and pick the type: MX or TXT.
- Fill in the host. For the domain itself that is usually
@(some panels want the field left empty). For other names, enter only the part before your domain -_dmarc, not_dmarc.example.com. - Paste the value. For MX, enter the priority in its own field if the panel has one.
- Save, wait a few minutes, and verify the record from outside (see the last section).
Gotchas that break mail setups
The host field and the automatic domain suffix
Almost every panel appends your domain to whatever you type as the host. Typing _dmarc.example.com therefore often creates _dmarc.example.com.example.com. If the panel shows the full name next to the field, check it before saving.
Trailing dots
In zone-file syntax, a name ending in a dot (mx.mailprovider.example.) is absolute; without the dot, the zone's own domain is appended. Simple web forms usually add the dot for you, but raw "text mode" zone editors (offered by OVHcloud and others) don't - an MX target without its trailing dot there turns into mx.mailprovider.example.example.com.
Old MX records
If the domain had mail before - often a default mailbox included by the registrar or host - delete its MX records. Leaving them next to the new ones splits incoming mail between two providers. The same goes for an old SPF record: merge or replace it, because a domain may only have one.
MX must point at a hostname
An MX value is a hostname, never an IP address and never a CNAME. A lower priority number means higher preference; with a single MX record the number doesn't matter.
TTL
The TTL says how long resolvers may cache a record. Before a migration, lower it to 300-3600 seconds so changes and corrections spread quickly; once everything works you can raise it again. An old record can stay cached for up to its previous TTL.
Long TXT values
A single TXT string holds at most 255 characters, and a 2048-bit DKIM key is longer. Most panels split long values automatically. If yours rejects the value, enter it as several quoted strings separated by spaces, in one record:
A long DKIM value split into two strings
"v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx3..." "...rest of the key...IDAQAB"Receivers join the strings without adding spaces. Don't create two separate TXT records for one key, and don't put line breaks in the key itself.
Registrar-specific notes
Control panels are redesigned regularly, so menu names below are what you will usually find - look for the nearest equivalent if your panel differs.
Cloudflare
Records live under the domain's DNS → Records. The important rule: Cloudflare's proxy (the orange cloud) only carries web traffic. A hostname that mail has to reach - such as an MX target inside your own zone - must be set to DNS only (grey cloud), or mail to it fails. MX and TXT records themselves can't be proxied. If you enabled Cloudflare Email Routing earlier, it added its own MX and SPF records; disable it or remove those records before adding another provider's. Cloudflare usually handles long TXT values for you.
OVHcloud
In the control panel, open your domain under Web Cloud → Domain names and use the DNS zone tab to add entries. The default OVHcloud zone often includes MX records and an SPF record for OVHcloud's own mail service - remove or edit them. Changes only apply if the domain uses OVHcloud's DNS servers (see the DNS servers tab). The entry wizard may offer SPF and DKIM as separate types; they are stored as TXT records. If you use the text editor, mind the trailing dots.
home.pl
In the home.pl customer panel, go to your domains, select the domain and look for its DNS zone or DNS records settings. Domains bought with a home.pl hosting package often come with MX and SPF records pointing at home.pl's mail servers - replace them when you move your mail.
nazwa.pl
In the nazwa.pl customer panel, DNS records are usually managed in the domain's DNS settings. If the domain is linked to a nazwa.pl hosting server, its zone may be managed from that hosting service instead. Remove the default MX records for nazwa.pl mail before adding new ones.
GoDaddy
Open the domain from your product list and choose DNS (or "Manage DNS"), then "Add New Record". GoDaddy uses @ for the domain itself. If the domain was set up for GoDaddy's own email, existing MX and SPF records point there and need replacing.
Namecheap
Go to Domain List → Manage → Advanced DNS. TXT records go under "Host Records" with @ for the domain itself. MX records are often in a separate "Mail Settings" section, where you first select Custom MX; other options there (such as Namecheap's email forwarding) replace your MX records.
Verify the records
Check each record from outside your provider's panel:
Command-line checks
dig MX example.com +short
dig TXT example.com +short
dig TXT selector._domainkey.example.com +short
dig TXT _dmarc.example.com +shortOr check everything at once with the email authentication checker. With AnyMail you don't have to: the dashboard checks domain ownership, MX, SPF, DKIM and DMARC for you and tells you exactly which record still needs fixing.
Let AnyMail handle these records for you
AnyMail generates the MX, SPF, DKIM and DMARC records for your domain, checks every one of them automatically and tells you exactly which record to fix - then hosts your inboxes, operated from the EU.