Reverse DNS Lookup: What it is and How to Set it Up

A reverse DNS lookup takes an IP address and returns the hostname registered to it. Forward DNS turns unspam.email into an IP address; reverse DNS does the opposite, using a PTR record published by whoever owns the IP block.

It matters most for email. Receiving mail servers check whether your sending IP has a reverse DNS record before they decide what to do with your message, and a missing record is treated as a strong signal of a misconfigured or disposable sender. Across the sending IPs we test, 99% have valid reverse DNS, so the 1% without it stand out immediately.

This guide covers what reverse DNS is, how to run a lookup from the command line or a browser, and how to create the PTR record itself.

What is reverse DNS?

Reverse DNS is the lookup that determines the hostname associated with a given IP address. Forward DNS does the reverse, retrieving an IP address from a hostname.

DNS itself is the Domain Name System, the phonebook of the Internet, and it works in both directions because both humans and machines need to read it. Forward lookups are the ones you use every day without noticing. Reverse lookups are the ones mail servers use to decide whether to trust you.

The vital thing to note about reverse DNS is that even though IETF claims that every domain should be capable of doing a lookup, in fact, not all IP addresses have a reverse entry.

The reason for that is banal: reverse DNS is not crucial for DNS to function correctly. Therefore, reverse DNS lookup is only a recommendation, not a requirement.

However, in most cases, especially when it comes to popular or serious companies, reverse DNS lookup can be easily done.

Press play to load this video from YouTube (Google). See our cookie policy.

How does reverse DNS work?

A resolver reverses the IP address, appends the reverse-zone suffix, and asks DNS for the PTR record at that name. The steps are:

  • The system looks for a PTR record in the server.
  • If the record is found, it retrieves the IP address and appends it to ‘.in-addr.arpa’ (or in the case of IPv6 to ‘.ip6.arpa’) in order to get the location of the file with the domain’s information. After that, it retrieves the hostname.
  • If the PTR record is not found, it cannot match the domain and IP address, returning an undefined result.

A lookup that returns nothing is not an error. It means no PTR record is published for that address, which is common on consumer broadband and on shared hosting, and which is exactly the state receiving mail servers treat as suspicious.

 Let us consider some good reasons why reverse DNS is important.

What is Reverse DNS and How to Setup

The basic principle of reverse DNS lookup

Why reverse DNS matters for the mail you send

Reverse DNS is one of the cheapest trust signals a sender can publish, and one of the few that is checked before your content is ever examined. Three things depend on it.

Mail acceptance

Similar to SPF, DKIM, and DMARC, reverse DNS is used to separate legitimate senders from throwaway infrastructure. Mail servers look up the sending IP, and many reject or heavily penalise a connection when no PTR record comes back, on the reasoning that a serious sender controls its own IP block and a spammer usually does not. The strictest receivers also require forward-confirmed reverse DNS, where the hostname in the PTR record resolves back to the same IP.

Reverse DNS is only one signal they weigh, though: the IP's standing on blocklists matters just as much, and across the sending IPs we test 6% turn up on an IP blacklist. If you want to see exactly which IP a message was sent from and how the receiving server judged it, run a suspect message through our email header analyzer.

Spam filtering and abuse tracing

Reverse DNS lies at the core of several long-standing anti-spam techniques. A receiving server that can resolve a connecting IP to mail.yourcompany.com treats it very differently from one that resolves to nothing, or to a generic ISP hostname like host-92-14-233-8.dynamic.example.net. The same lookup is what lets abuse desks and security teams identify the operator behind an IP that is sending malicious email, probing a firewall, or attempting to break into a system.

Readable logs and diagnostics

Server logs, traceroutes and monitoring tools resolve IPs to hostnames so a human can read them. Without reverse DNS your traffic appears in everyone else's logs as a bare number, which makes your own troubleshooting slower and makes you look anonymous to anyone investigating an incident.

What reverse DNS does not do. It does not tell you who visited your website, which pages they read, how long they stayed, or what device they used. That information comes from web analytics, and the company-level attribution some vendors sell on top of it comes from commercial IP-to-organisation databases, not from a PTR record. A reverse lookup returns one hostname and nothing else.

Reverse DNS is optional for the protocol and mandatory in practice

Reverse DNS is not required for DNS to function, which is exactly why so many senders skip it and why skipping it is expensive. The IETF expects every address to be resolvable, but a missing PTR record breaks nothing technically, so nothing forces the issue until your mail starts bouncing.

The deal is that mail servers and ISPs verify reverse DNS setup when deciding what to do with email from your server. They check whether the IP address of the sending server has a reverse DNS record. Most servers consider it fraud if there is no record and reject emails from this source without any ado. This is now an established norm: across the sending IPs we test, 99% have valid reverse DNS, so the 1% that lack it stand out immediately to receiving servers.

Suppose you run email marketing campaigns and constantly reach your subscribers through this channel. In that case, the absence of a reverse DNS setup may become a real roadblock since your emails will be rejected without any valid reason. Therefore, it is highly recommended to set up reverse DNS for your domain to ensure a high deliverability rate for your email.

In addition, with reverse DNS in place, you contribute to the community and address common security issues. The basic setup may help other units to identify potential threats and fight cybercrime more efficiently, thereby creating a safe and transparent ecosystem for you and your customers.

How to perform reverse DNS lookup?

There are two ways to run a reverse DNS lookup: a single command on your own machine, or a web-based tool if you would rather not touch a terminal.

The first way implies the utilization of the command line. Since most operating systems (Linux, macOS, and of course Windows) can send requests to the Domain Name System to get a hostname based on an IP address, you can easily use some help of your PC or notebook.

For instance, Windows users can use such commands as “ping” or “nslookup.”  The sample query looks like this:

ping -a w.x.y.z

or

nslookup 7.7.7.7

If the reverse lookup zone is in place, these commands return the domain name.

In Linux operating systems, you can use the “dig” command followed by the “-x” flag and IP address, like this

dig -x 7.7.7.7

If the command line scares you, a browser-based lookup gives you the same answer.

Three tools that run a reverse DNS lookup in a browser

Unspam, MxToolBox and WhatIsMyIP all resolve an IP to its hostname without a terminal, and all three are free for this check.

  • Unspam.email. Unspam is a professional email spam checker and heat map prediction. Among its numerous diagnostic tools, you will find reverse DNS lookup. It will give you good insights on reverse DNS record: whether it is appropriately configured and whether the mail server IP rDNS matches the HELO client-IP, things that are crucial for email marketers. While you are there, pair it with an MX record lookup to confirm the same mail server is the one actually receiving your domain’s email.
  • MxToolBox. MxToolBox is another multitasking diagnostic service. Although most of its tools come with a fee, the reverse DNS lookup is available free of charge. Just enter the IP address either in an IPv4 or IPv6 format and enjoy the results.
  • WhatIsMyIP. Runs both forward and reverse lookups from the same box. Enter the IP address and it returns the PTR hostname.

How to Perform Reverse DNS Lookup?

How to set up reverse DNS in six steps

Setting up reverse DNS means asking whoever owns your IP block to delegate the reverse zone to you, then publishing a PTR record in it. You need a dedicated IP address for any of this: on shared hosting the PTR record belongs to your provider and you cannot change it.

Step 1: Gather Necessary Information

The first thing to do in order to set up reverse DNS is to figure out who your hosting provider is and whether you have access to DNS.

In the majority of cases, your hosting provider or ISP owns your IP block. However, if this is not the case, you can determine who the owner is by using free third-party services like IP WHOIS Lookup.

Step 2: Define Reverse DNS Zone Name

After you define the owner of the IP block, you need to contact it and request a zone for your mail server’s IP address.

You may notice that this zone ends in “in-addr.arpa” and features an IP block with the octets reversed. This is an official syntax that you need to use to create your own reverse DNS zone.

The format is straightforward: it starts with an IP address with octets reversed and ends with “.in-addr.arpa”.

Follow this simple 5-step routine to define your reverse DNS zone name:

  • Take your network IP address.
  • If it is classless address block, then remove the netmask portion of the address. If it is a full address block, then you need to omit the last octet.
  • Reverse the order of the remaining octets.
  • Add ‘in-addr.arpa’ to the end.
  • If it is a classless address block, then you need to insert the netmask back into the address using the dash (-) sign. Though, note, some Assigning Authorities may ask you to use a slash (/) to make it valid.

Consider the example to get a complete understanding of the procedure.

For example, you have an IP address 187.133.11.219/27. It is a classless address block. Therefore, you need to remove the netmask portion, aka “/27”.

So, now you have 187.133.11.219

After that, you need to reverse the order of the octets: 219.11.133.187

Then, add “.in-addr.arpa”: 219.11.133.187.in-addr.arpa

Finally, bring back the netmask portion using dash sign: 219-27.11.133.187.in-addr.arpa

Step 3: Request Reverse DNS Delegation

Ask your ISP to delegate reverse DNS to your DNS provider. For this, you need to provide your ISP with the nameservers for your domain.

The nameserver for your domain could be found via a free tool called Dig Web Interface Tool.

If a hosting provider or ISP cannot delegate the reverse DNS, it will probably do everything by itself. Therefore, you can leave the reverse DNS setup to the supporting team and skip the next steps.

Step 4: Create Reverse DNS Zone

Log into your hosting provider and find the DNS Menu in the control panel.

Click on it and select “Manage DNS.” It may be called something similar.

Click “Add domains.”

Enter the reverse DNS zone name that we have defined in step 2.

Step 5: Create PTR Record

After you have created the zone file, you need to create a PTR record. It takes two steps in your control panel.

Open the corresponding tab. Depending on your provider, it may be called a “PTR record” or something alike.

Enter the final digit of the IP address into the “name” field.

Enter the domain name you would like the IP address to map into the “canonical name” field.

Step 6: Confirm the record, do not just wait

Propagation is governed by the TTL on the zone, so a new PTR record is usually visible within minutes to a few hours rather than the two days the old advice suggests. Allow up to 24 hours before assuming something is wrong, and re-run the lookup to confirm rather than waiting blind.

How to Set up Reverse DNS?

DNS Record for Unspam.email

One PTR record is the whole job

Reverse DNS costs one record and buys you the benefit of the doubt from every receiving mail server, which is why 99% of the sending IPs we test already have it.

Find out who owns your IP block, ask them to delegate the reverse zone, publish a PTR record that points at a hostname you control, and confirm that hostname resolves back to the same IP. Then run a free spam test to see how the receiving side now reads your mail, and check the email headers of a real message to confirm the PTR is being returned.

Frequently asked questions

What is a reverse DNS lookup?

A reverse DNS lookup takes an IP address and returns the hostname registered to it, using a PTR record. Forward DNS does the opposite, turning a hostname into an IP address.

What is a PTR record?

A PTR record is the DNS record that maps an IP address back to a hostname. It lives in a reverse zone under in-addr.arpa for IPv4 or ip6.arpa for IPv6, and it is published by whoever owns the IP block, usually your hosting provider or ISP.

Do I need reverse DNS to send email?

In practice yes. Many receiving servers reject or penalise mail from an IP with no PTR record. Across the sending IPs Unspam tests, 99% have valid reverse DNS, so the 1% without it are conspicuous.

How do I check the reverse DNS of an IP address?

Run nslookup or ping -a on Windows, or dig -x on macOS and Linux. For example, dig -x 7.7.7.7 returns the PTR hostname. A browser-based lookup gives the same answer if you would rather not use a terminal.

Can I set reverse DNS on a shared IP address?

No. The PTR record belongs to the owner of the IP block, so on shared hosting it is your provider's to set and it will point at their hostname. You need a dedicated IP address to publish your own.

How long does a PTR record take to work?

Propagation follows the TTL on the reverse zone, so a new PTR record is usually visible within minutes to a few hours. Allow up to 24 hours before treating it as a fault, and re-run the lookup rather than waiting blind.

What is forward-confirmed reverse DNS?

Forward-confirmed reverse DNS means the hostname in your PTR record resolves back to the same IP address it came from. Strict receivers check both directions, so a PTR pointing at a hostname with no matching A record still fails.

See where your campaign actually lands.

Start a free spam test Inbox placement test