← Back to blog
Domain & Network

Reverse DNS Lookup: What PTR Records Are and How to Check Yours

Your DNS host can't set a PTR record for you — reverse DNS is answered by whoever owns the IP block, which is why adding one to your zone file does nothing at all.

By Rajhussain Kanani7 min read

The short answer

A reverse DNS lookup takes an IP address and returns the hostname assigned to it — the opposite of the normal lookup that turns example.com into an IP. It works by querying a PTR record, and the fastest way to run one is dig -x 8.8.8.8 on macOS or Linux, or nslookup 8.8.8.8 on Windows.

The reason anyone cares is email. Nearly every large mail provider checks that the IP connecting to it has a PTR record, and rejects or heavily penalises mail from IPs that don't. A missing PTR is one of the few deliverability problems that produces an outright refusal rather than a slow slide into the spam folder.

Forward and reverse are two separate databases

This is the part that trips people up. A forward lookup — name to IP — is answered by the nameservers for your domain, which you control through your registrar or DNS host. A reverse lookup is answered by the nameservers for a completely different zone, one derived from the IP address itself, and those are controlled by whoever owns the IP block.

Reverse DNS for IPv4 lives under the special domain in-addr.arpa, with the four octets written backwards. A lookup on 8.8.4.4 is really a PTR query for 4.4.8.8.in-addr.arpa. The reversal exists because DNS delegates from right to left, while IP addresses get more specific from left to right — flipping them lets a registry hand 8.8.8.in-addr.arpa to the organisation that holds that block. IPv6 uses ip6.arpa and the same idea taken further: every hex digit of the fully expanded address becomes its own label, in reverse, which is why an IPv6 PTR name is 32 labels long.

The practical consequence: you cannot set your own PTR record at your DNS host. Adding a PTR to your domain's zone file does nothing at all. The record has to be created by the entity that controls the IP — your hosting provider, cloud platform, or ISP.

Why mail servers insist on it

Receiving mail servers run a check called forward-confirmed reverse DNS, and it has three steps: look up the PTR for the connecting IP, take the hostname that comes back, then look that hostname up forward again and confirm it resolves to the same IP. Only a round trip that closes counts as a pass.

The logic is simple — anyone can claim any hostname in a mail greeting, but only the IP's actual owner can publish its PTR. A matching pair proves whoever runs the mail server also legitimately controls the address it's sending from. Consumer broadband IPs almost always have generic PTRs like 203-0-113-45.dsl.example-isp.net, and many receivers reject mail from those patterns on sight, which is why sending mail from a home connection rarely works regardless of how well SPF, DKIM and DMARC are configured.

The forward half of the check is the half you control. CheckSEO's DNS Lookup returns a domain's A, AAAA, MX, NS and TXT records in one query — so once your host has set a PTR, you can confirm the hostname it points to actually resolves back to the same IP, which is what completes the match.

Look up a domain's DNS records

Reading the output

dig -x 8.8.8.8 +short returns dns.google. — one line, trailing dot included, because that is the fully qualified name. Drop +short and you get the full response, where the ANSWER SECTION shows the query rewritten as 8.8.8.8.in-addr.arpa. 86399 IN PTR dns.google. That middle number is the remaining TTL in seconds.

An empty answer with status NXDOMAIN means no PTR exists for that IP. A status of SERVFAIL usually means the reverse zone is delegated to nameservers that aren't answering — a provider-side problem, not yours. And an answer that returns a hostname which thendoesn't resolve forward to the same IP is worse than nothing: it looks like a misconfiguration or a spoof attempt to the receiving server.

How to get a PTR record set

1

Work out who owns the IP

Run a WHOIS query on the address (whois 203.0.113.45) and read the organisation on the netblock. That is who can set the PTR — not your domain registrar, even if the two happen to be the same company for other services.

2

Set it in the provider's panel, or open a ticket

Most cloud platforms expose it directly: AWS requires a support request to remove the EC2 sending limit and set reverse DNS for an Elastic IP; Google Cloud and Azure both have a reverse DNS field on the static IP resource; DigitalOcean derives the PTR from the droplet's name, so renaming the droplet to your mail hostname sets it. On dedicated or VPS hosting it is usually a field in the control panel labelled rDNS or PTR.

3

Point it at a hostname you actually control

Use something like mail.yourdomain.com, and make sure that name has an A record pointing back to the same IP before you request the PTR. Set the forward record first — otherwise the check fails in the window between the two changes.

4

Match your mail server's HELO name too

The hostname your mail server announces itself with in the SMTP conversation should be the same one the PTR returns. When the PTR, the forward A record, and the HELO all agree, you have passed every reverse DNS test a receiver is likely to run.

What reverse DNS is not useful for

Two common misreadings are worth naming. First, a PTR record tells you nothing about who is browsing your site — a visitor's IP usually resolves to their ISP's generic pool name, which identifies the network, not a person or a company. Reverse lookups on visitor traffic are a poor identification method and a worse analytics one.

Second, reverse DNS is not shared hosting discovery. Finding every domain hosted on one IP is a reverse IP lookup, which searches a crawled database of forward records. It sounds similar and returns completely different data — an IP has one PTR record no matter how many hundreds of sites it serves. Reverse DNS also has no effect on search rankings; Google's crawler does use it to verify its own bots, but nothing about your PTR feeds into how your pages rank. If you are auditing a domain's wider technical footprint, the site health checks that do move rankings sit somewhere else entirely.

Check the forward side of the record

CheckSEO's DNS Lookup resolves a hostname's A, AAAA, MX, NS and TXT records in one query — the check to run right after your provider sets a PTR, to confirm the hostname it returns really does point back to the same address.

Frequently asked questions

What does a reverse DNS lookup do?

It takes an IP address and returns the hostname assigned to it, by querying a PTR record. It is the mirror image of a normal lookup, which turns a hostname into an IP. Mail servers use it to check that whoever is connecting genuinely controls the address they are sending from.

How do I run a reverse DNS lookup?

On macOS or Linux run dig -x 8.8.8.8 (add +short for just the hostname). On Windows run nslookup 8.8.8.8. Both rewrite the address into the in-addr.arpa form behind the scenes and return the PTR record, or NXDOMAIN if no PTR exists for that IP.

Why can't I add a PTR record at my DNS host?

Because reverse DNS lives in a separate zone derived from the IP address, delegated to whoever owns the IP block — your hosting provider, cloud platform or ISP. A PTR record added to your own domain's zone file is ignored entirely. Request it from the IP's owner instead.

What is forward-confirmed reverse DNS?

A three-step check receivers run: look up the PTR for the connecting IP, take the hostname it returns, then resolve that hostname forward and confirm it points back to the same IP. Only a round trip that closes counts as a pass, which is why the forward A record matters as much as the PTR.

Does reverse DNS affect SEO?

No. Nothing about your PTR record feeds into how your pages rank. Google's crawler does use reverse DNS to verify its own bots when a site checks whether a visitor really is Googlebot, but that is bot verification, not a ranking signal for your site.

Check your own site with the DNS Lookup.

Open DNS Lookup

More from the blog