Deliverability

Reverse DNS white labeling: How it works

When a recipient opens your email, would you rather it say “Sent by Mailgun” or have your company name displayed? By setting up reverse DNS (rDNS), you can tell mailbox providers to do this with added deliverability and tracking benefits for good measure.

PUBLISHED ON

PUBLISHED ON

The Domain Name System (DNS) is about as old as the internet itself, and it’s easy to understand why. Domain names, like mailgun.com, are way easier to memorize and remember than Internet Protocol (IP) addresses like 123.45.67.89.

Could you imagine remembering the IP address of every site you visit? That’d require superpowers.

With a DNS lookup, you query the DNS server to locate the IP address. However, DNS isn’t only about translating domain names into IP addresses. When we talk about DNS, we want to look at how it affects your email program’s health and cybersecurity, like your domain and IP reputations. After all, DNS also directs internet traffic like email and SIP voice/video and allows domain verification and ownership. It also permits senders like Mailgun to send messages on behalf of their customers. This last part is significant.

Let’s say an email marketer uses an email service provider (ESP) like Mailgun to send your company’s email marketing campaigns. Wouldn’t it be better if the email wasn’t labeled “Sent by Mailgun.com”? After all, marketing emails are all about making your brand recognizable.

Good news: You can do this by setting up proper reverse DNS (rDNS) records. In this article, we’ll talk about what rDNS is, why it’s important, some common mistakes, and how you can set up rDNS records with Mailgun.

What is reverse DNS (rDNS)?

Reverse DNS (rDNS) is the opposite of a regular DNS query. Instead of querying the DNS server or DNS name to find an IP address, a reverse DNS lookup queries the given IP address to find the hostname. Even though some differences exist between an IPv4 address and an IPv6 address, the process is generally the same.

In other words, reverse DNS works by resolving the sending email server IP address into its hostname, like example.com. By doing so, the rDNS determines that the IP address is connected to an authentic domain name. This is important: If your marketing team uses an ESP like Mailgun, you can set up rDNS records to display your company as the sender instead of “Sent by Mailgun.com.” For instance, an rDNS entry of m123-456.yourwebdomain.com will show the sender as you to inbox service providers (ISPs).

We covered something similar with masking the CNAME of mailgun.org in your DNS, but this is a bit different. In this instance, we’re only talking about the rDNS of your dedicated IP for sending.

Why is rDNS important?

We’ve talked about how rDNS can improve your email program by displaying your company as the sender to ISPs. Now, let’s dig into why this is important:

  • Email servers might reject incoming messages from any IP address that does not have rDNS. This is to discourage spammers. As you can imagine, this will affect your deliverability if you get caught in the spam filter.

  • You can use rDNS to reinforce your brand recognition. Instead of having an email be “Sent by (your ESP),” your messages will appear to be sent from you directly.

  • Outside of email, you can use rDNS lookup to track visitors to your webpage.

What are some common rDNS mistakes?

Before we get into setting up rDNS records, let’s look at some common rDNS mistakes. Specifically, we’ll focus on:

  • The pointer record

  • The hostname returned resolves to a different IP address than the original hostname

What does this all mean? Let’s dive into each of these below.

What is a pointer (PTR) record?

A PTR record is part of a package of information (A, MX, CNAME, etc.) tied to your IP address and stored with your hosting provider. Your server uses the PTR record to check that the mail server sending the email matches the IP address the message claims to be sent from. In short, a PTR record facilitates an rDNS lookup.

Check that your PTR record is set up correctly and returns a hostname for the IP address that’s being queried.

Why does the hostname need to be properly mapped to the IP address?

The hostname that’s being queried must resolve back to the same IP address. The goal is that the IP address points to the hostname and that the hostname points to the IP address. It’s easy to do the second part wrong, which causes rDNS lookup to fail.

For example, suppose your IP is 8.8.8.8, and you’ve set the PTR record to return mail.yourwebsite.com. But, when you use rDNS to look up mail.yourwebsite.com, the IP address returns as 9.9.9.9 instead of 8.8.8.8. Or, worse, the hostname doesn’t resolve at all.

To fix the problem, you would have to make sure that mail.yourwebsite.com resolves to 8.8.8.8.

Can I set up rDNS records with Mailgun?

At Mailgun, we can create IP addresses for dedicated sending that are assigned to only sending outgoing emails. These IP addresses resolve in reverse to hostnames at a domain that belongs to us. We can also set up rDNS records for your dedicated IPs to make it look like you’re sending from yourself directly rather than from Mailgun.

Wait, really? Yes, we can create custom PTR records for you so that the rDNS record of a connecting IP represents the message.

What this means is that everything sends the same way as always. The only difference is that the message looks like it’s coming from you directly rather than through a service like Mailgun.

Ready to get started? Read on to learn how.

How do I set up rDNS with Mailgun?

Before we dive in, keep in mind that this can’t be done with shared IPs since rDNS can only resolve for one hostname. However, if you’re using a dedicated IP, it adds a nice added polish to your messages. And it doesn’t hurt with inbox providers either if you have a good reputation.

Follow the steps below to get set up:

  1. Get in touch with Mailgun, and we’ll provide you with an “A record.”

  2. Input the “A record” into your zone file at your hosting provider. An “A record” will look something like this: A, mail.customer.com, 123.45.67.89

  3. Submit a ticket to our support team, and we’ll update the PTR record on our end to match the hostname you’re using.

Wrapping up

Set up your rDNS record with Mailgun today and get sending. Want to learn more ways to superpower your email program game? Check out our tips for email automation. Or are you intrigued about securing your email process? Learn how to secure email gateway holes.

Keep me posted! Get our news and tips every week.

Send me the newsletter. I expressly agree to receive the newsletter and know that I can easily unsubscribe at any time.

Related readings

Email authentication: Your ID card for sending

Email Authentication lets ISPs know that who you are as a sender, and that your emails are coming from you and not a spammer — but what does that entail?

Read more

Dedicated vs. Shared IPs: Knowing which one to use

Let’s break down if a dedicated or shared IP address is right for your email sending needs.

Read more

Implementing DMARC: A step-by-step

DMARC is not just a record, it’s a process of organizing your email program to keep spoofers from impersonating you. Follow these steps to get set up:

Read more

Popular posts

Mailgun iconSee what you can accomplish with the world's best email delivery platform. It's easy to get started.Let's get sending
CTA icon Mailgun Icon