Skip to main content
If your domain uses Cloudflare for DNS management, you must configure specific email DNS records in Cloudflare so that your DirectAdmin custom email addresses (user@yourdomain.com) can send and receive emails properly.

1. Find Email DNS Records in DirectAdmin

  1. Log in to your DirectAdmin control panel.
  2. Under the Account Manager menu, click DNS Management.
DNS Management Menu

Select DNS Management under Account Manager

Note your server IP address, MX record value, and SPF TXT record:
DNS Management Table

DNS Management Records Table in DirectAdmin


2. Add DNS Records in Cloudflare Dashboard

Open your Cloudflare Dashboard -> select your domain -> navigate to DNS -> Records, then add the following records:

A. A Record for Mail Subdomain

  • Type: A
  • Name: mail
  • IPv4 Address: Enter your DirectAdmin server IP (e.g. 82.25.62.14).
  • Proxy status: DNS Only (Grey Cloud / Unproxied)
CRITICAL - Set Proxy Status to DNS Only: The mail hostname MUST NOT be proxied by Cloudflare (no orange cloud). Cloudflare proxies HTTP/HTTPS traffic only, while mail protocols (SMTP, IMAP, POP3) require a direct connection.

B. MX Record (Mail Exchanger)

  • Type: MX
  • Name: @
  • Mail server: mail.yourdomain.com
  • Priority: 10
  • TTL: Auto

C. TXT Record (SPF - Anti-Spam / Authentication)

  • Type: TXT
  • Name: @
  • Content: "v=spf1 a mx ip4:82.25.62.14 ~all" (replace with your server IP from DirectAdmin DNS Management).
  • TTL: Auto

3. Email Client Connection Settings (Webmail / Outlook / Gmail)

Once DNS propagates:
  • Webmail URL: https://yourdomain.com/roundcube or https://webmail.yourdomain.com
  • Incoming Mail Server (IMAP/POP3): mail.yourdomain.com (Port 993 SSL / Port 995 SSL)
  • Outgoing Mail Server (SMTP): mail.yourdomain.com (Port 465 SSL / Port 587 STARTTLS)
  • Username: Full email address (e.g. info@yourdomain.com)
  • Password: Password created under DirectAdmin E-mail Accounts.

Done 🎉

Your business domain emails are now integrated with Cloudflare and ready for communication!
Last modified on August 30, 2026