Looking to add DNS records for your WP Mail SMTP mailer setup for domains hosted on Cloudflare? Completing the DNS record setup provided by your mailer helps with domain verification and improves email deliverability.
This tutorial covers the process of adding DNS records for WP Mail SMTP on Cloudflare.
In This Article
Before getting started, make sure WP Mail SMTP is installed and activated on your WordPress site.
Understanding How DNS Records Work in SMTP
Domain Name System (DNS) is like the internet’s address book. It provides a means to map a domain name (e.g.,
example.com) to its corresponding IP address (e.g.,
188.8.131.52). Just like how you store a person’s phone number with their name on your smartphone to easily remember them.
DNS records act as a storage system for the settings needed to map a domain name to its corresponding IP address. This means each domain has its unique set of DNS records.
Most email providers in WP Mail SMTP use DNS records as a means to verify your domain on their platform. However, it can also be used to improve email deliverability, as in the case of adding SPF, DKIM, and DMARC records.
In the next sections, we’ll cover the steps for adding DNS records for domain names hosted on Cloudflare.
Accessing DNS Settings on Cloudflare
Before getting started, you’ll first need to locate your domain’s DNS settings. To do so, log in to your Cloudflare account dashboard.
Once you’ve logged in, you’ll see all the domains on your Cloudflare account. Go ahead and select the one you’d like to add the DNS record to.
After that, navigate to DNS » Records to access the DNS records for your domain.
Adding Your DNS Records
To add a new DNS record, click the Add record button.
Under the Type dropdown, you’ll need to select the record type required by your chosen mailer.
As an example, we’ll add one of the CNAME records SendLayer provides when setting it up with WP Mail SMTP. To proceed, select CNAME from the dropdown.
After that, copy the Hostname value from your SendLayer account and paste it into the Name (required) field on Cloudflare.
Note: When adding DNS records, be aware that the naming for the fields from your mailer or domain host might differ. For instance, a field labeled as “Name” in one interface might appear as “Host Record” or “Hostname” in another. Always refer to your host or mailer’s documentation to understand their specific terminology.
Next, return to your SendLayer account and copy the Value. Then paste the value you copied to the field labeled Target (required) on Cloudflare.
For the Time To Live, select 5 min from the TTL dropdown.
Note: The TTL value may differ depending on your chosen mailer or the record type. Be sure to enter the correct value provided by your mailer.
When you’re done adding the details for the DNS record, go ahead and click the Save button to add your record.
After adding the first record, you’ll need to repeat the steps above to add other DNS records your mailer provides.
Note: It can take up to 24-48 hours for DNS changes to propagate.
Verifying Your DNS Records
After adding the DNS records to support WP Mail SMTP, we recommend verifying that they’ve been implemented correctly. This step helps ensure optimal email deliverability by confirming that your outgoing emails are authenticated.
There are a couple of ways to verify your DNS records:
- Sending a test email: Utilize WP Mail SMTP’s built-in tool for sending a test email. If there’s an issue with your DNS records, an error notification will pop up.
- Using the Site Health tool: The WordPress Site Health tool can help identify any DNS verification problems. If there’s a verification issue with your DNS records, you’ll see a message that provides actions you can take to help resolve it.
To learn more about using these tools, be sure to check out our complete guide to verifying your DNS records.
Note: Changes to DNS settings might take up to 48 hours to fully propagate. If you’ve made recent updates, giving it a little more time before troubleshooting might be worthwhile.
That’s it! Now you know how to add DNS records for domains hosted on Cloudflare.
Next, would you like to view logs of all the emails sent through your website? See our tutorial on setting up email logging in WP Mail SMTP for more details.