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.



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

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”? 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 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” For instance, an rDNS entry of will show the sender as you to inbox service providers (ISPs).

We covered something similar with masking the CNAME of 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, and you’ve set the PTR record to return But, when you use rDNS to look up, the IP address returns as instead of Or, worse, the hostname doesn’t resolve at all.

To fix the problem, you would have to make sure that resolves to

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,,

  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.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Related readings

Email authentication: Your ID card for sending

Email authentication lets mailbox providers know that you’re a trusted sender – that you are who you say you are. As a Technical Account Manager at Mailgun, I’m constantly...

Read more

Email hard bounces: The brick walls of failure

We’ve talked a lot about email bounces and email bounce rates as a whole in the past before, but we’ve really only ever dipped our toes into the different types of bounces...

Read more

What are SMTP commands and what do you need to know about them?

Why do we need SMTP commands and what do they do? Well, we use SMTP (Simple Mail Transfer Protocol) commands to communicate with email servers. These commands are...

Read more

Popular posts

Email inbox.

Build Laravel 10 email authentication with Mailgun and Digital Ocean

When it was first released, Laravel version 5.7 added a new capability to verify user’s emails. If you’ve ever run php artisan make:auth within a Laravel app you’ll know the...

Read more

Mailgun statistics.

Sending email using the Mailgun PHP API

It’s been a while since the Mailgun PHP SDK came around, and we’ve seen lots of changes: new functionalities, new integrations built on top, new API endpoints…yet the core of PHP...

Read more

Statistics on deliverability.

Here’s everything you need to know about DNS blocklists

The word “blocklist” can almost seem like something out of a movie – a little dramatic, silly, and a little unreal. Unfortunately, in the real world, blocklists are definitely something you...

Read more

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