Domain host

How to add MX, TXT and CNAME records in Cloudflare

DNS and security provider. Records live on the DNS Records page, where each record can be proxied or DNS only.

Find the DNS editor

  1. Sign in to the Cloudflare dashboard and select your domain.
  2. Open the DNS Records page.
Open Cloudflare

What goes in each field

Record Host field Value field
MX Name Mail server + Priority
TXT Name Content
CNAME Name Target
  • For your bare domain, MX: enter @ in Name; TXT: enter @ in Name; CNAME: enter @ in Name.
  • For other names, type only the part before your domain (for example _dmarc). Cloudflare adds your domain automatically.
  • Default TTL: Auto.

Adding a record at Cloudflare

MX record

  1. On the DNS Records page, select Add record.
  2. Choose MX as the Type.
  3. Fill in Name, Mail server and Priority.
  4. Select Save.
  5. Delete any other MX records: select Edit on each one, then Delete, and confirm.

TXT record

  1. On the DNS Records page, select Add record.
  2. Choose TXT as the Type.
  3. Fill in Name and Content.
  4. Select Save.

CNAME record

  1. On the DNS Records page, select Add record.
  2. Choose CNAME as the Type.
  3. Fill in Name and Target.
  4. Set Proxy status to DNS only (grey cloud).
  5. Select Save.

Cloudflare gotchas

Cloudflare DNS: questions

How do I add an MX record in Cloudflare?

Sign in to the Cloudflare dashboard and select your domain. Open the DNS Records page. On the DNS Records page, select Add record. Choose MX as the Type. Fill in Name, Mail server and Priority. Select Save. Delete any other MX records: select Edit on each one, then Delete, and confirm.

How do I add a TXT record in Cloudflare?

Sign in to the Cloudflare dashboard and select your domain. Open the DNS Records page. On the DNS Records page, select Add record. Choose TXT as the Type. Fill in Name and Content. Select Save.

What goes in the Name field at Cloudflare?

Enter @ for records on your bare domain, such as MX and SPF. For the others, enter only the part before your domain, for example _dmarc. Cloudflare adds your domain automatically.

How long do DNS changes take at Cloudflare?

Cloudflare says changes to your DNS records take effect worldwide within 5 minutes, usually much less. A record you replaced can stay cached until its old TTL runs out.