Configuring DNS Records for Email in Cloudflare

Learn how to set up DNS records in Cloudflare so your domain’s email works correctly.


DNS Records in Cloudflare

When you add a domain to Cloudflare, it usually scans and imports your domain’s DNS records automatically. However, there may be times when you need to manually add or update records to ensure your email continues to function correctly.

For example, if a domain’s TXT record for SPF is changed or deleted with the domain registrar, Cloudflare may not detect the change, and you would need to add it manually.


Primary DNS Records for Email

The main DNS records related to email are:

  • MX (Mail Exchanger) record: Directs email to your mail servers. Most domains have multiple MX records.

  • SPF (Sender Policy Framework) record: A TXT record used to verify sending servers.

  • DKIM (DomainKeys Identified Mail) record: A TXT record used to authenticate outgoing email.


Steps to Configure DNS Records in Cloudflare

Step 1: Get Current DNS Values from cPanel

  1. Log in to cPanel.

    • Note: If you don’t know how to log in, see this article.

  2. On the Tools page, under Domains, click Zone EditorcPanel - Domains - Zone Editor icon

  3. Locate the domain and click Manage.

  4. Note the values for MX, SPF, and DKIM records.


Step 2: Log in to Cloudflare

  1. Go to https://dash.cloudflare.com/login and log in.

  2. On the Home page, click your domain. Cloudflare - Account home page

  3. In the left sidebar, click DNS.

         Cloudflare - Account sidebar - DNS


Step 3: Add the MX Record

  1. In the DNS management section, click Add recordCloudflare - Account - Add record

  2. Select MX for the Type. Cloudflare - Account - Add MX record

  3. In the Name box, enter the value from cPanel.

  4. In the Mail server box, enter the destination from cPanel.

  5. Set TTL to Auto.

  6. In Priority, enter the value from cPanel.

  7. Click Save.

    • Note: Repeat these steps for additional MX records if needed.


Step 4: Add the SPF Record

  1. Click Add recordCloudflare - Account - Add record

  2. Select TXT for the Type. Cloudflare - Account - Add TXT record

  3. In Name, enter the value from cPanel.

  4. Set TTL to Auto.

  5. In Content, enter the SPF record value from cPanel.

  6. Click Save.


Step 5: Add the DKIM Record (if applicable)

  1. Click Add recordCloudflare - Account - Add record

  2. Select TXT for the Type. Cloudflare - Account - Add TXT record

  3. In Name, enter the DKIM value from cPanel.

  4. Set TTL to Auto.

  5. In Content, enter the DKIM value from cPanel.

  6. Click Save.


Cloudflare is now configured to use your domain’s email settings.

Răspunsul a fost util? 0 utilizatori au considerat informația utilă (0 Voturi)

Powered by WHMCompleteSolution