New guide: how to warm up a dedicated IP without hurting your reputation. Read now →
Log in
MigoSMTP
Domains and DNSUpdated 4 Nov 2026

PTR record and reverse DNS for email: how to set and check it

A PTR record maps a sending IP address back to a hostname, and many mail servers check it. This guide shows how reverse DNS works, how to get yours set, how to verify forward-confirmed reverse DNS, and how to fix mismatches.

AO
Written by Amara Okafor
DNS and Domain Specialist
Reviewed by Jonas Lindqvist
  • Published28 Jun 2024
  • Read time7 min
  • Length1,391 words
Share this guide

A PTR record is the reverse of an A record: it maps an IP address to a hostname. Mail servers look up the PTR record of the IP address that connects to them, because a sending IP with no reverse DNS, or with a generic name that does not match, is a common sign of a compromised machine or a poorly run server. For email you want every sending IP to have a PTR record with a real hostname that resolves back to the same IP.

You cannot set a PTR record in your domain's DNS zone, in the usual case. Reverse records live in a zone owned by whoever controls the IP block, normally your hosting provider, cloud platform or ISP. You request or set the record through them. The sections below show how the lookup works, how to ask for the right record, how to verify it, and how to fix the usual mismatches.

What it doesMaps an IP address to a hostname, the reverse of an A record
Who sets itThe owner of the IP block: your host, cloud provider or ISP
Goal for mailForward-confirmed reverse DNS: IP to name and name back to the same IP
Also matchThe HELO/EHLO name your server announces should be the same hostname

How reverse DNS works

Reverse lookups use special zones. For IPv4, the address is written backwards and .in-addr.arpa is appended. For IPv6, each hex digit (nibble) is written backwards and .ip6.arpa is appended. The documentation addresses below are reserved for examples.

IP addressReverse name
203.0.113.2525.113.0.203.in-addr.arpa
2001:db8::255.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.b.d.0.1.0.0.2.ip6.arpa
25.113.0.203.in-addr.arpa.  3600  IN  PTR  mail.example.com.

Authority follows ownership of the address block. The provider holds the zone, or delegates a small block to you. For blocks smaller than a /24, delegation uses the method in RFC 2317, so your provider may ask you to confirm the hostname instead of giving you a zone to edit.

What receivers check

  • A PTR record exists. Some receivers reject or heavily penalise connections from IPs without one.
  • Forward-confirmed reverse DNS (FCRDNS). The PTR hostname must resolve by A or AAAA back to the connecting IP. See FCRDNS.
  • A sensible name. Names built from the IP, such as 203-0-113-25.dyn.example.net, mark dynamic or residential ranges and are often scored down or blocked.
  • HELO consistency. The name in your EHLO command should be a hostname that resolves to the sending IP, ideally the same as the PTR name. See reverse DNS and the HELO name.
  • One PTR per IP. Several PTR records on one address cause inconsistent results and should be avoided.

Reverse DNS is one of several signals. It does not replace SPF, DKIM and DMARC, which authenticate the domain, and it does not by itself build reputation. See domain versus IP reputation and email authentication explained.

How to check reverse DNS

# IPv4 lookup
dig -x 203.0.113.25 +short
# mail.example.com.

# IPv6 lookup
dig -x 2001:db8::25 +short

# Forward check: the name must return the same IP
dig +short A mail.example.com
dig +short AAAA mail.example.com

# Alternatives
host 203.0.113.25
nslookup 203.0.113.25

The check passes when the first command returns your hostname and the forward lookup returns the original IP. Run it for every IP your mail server can use to connect out, including IPv6, since receivers see whichever family the connection uses. On a server that sends on both, either publish matching PTR and AAAA records or disable IPv6 delivery until you have. See IPv6 email sending.

How to set a PTR record

  1. Choose the hostname. Use a name in a domain you control and that you are happy to be seen in headers, such as mail.example.com or mta1.example.com. Use a different name per IP if you have several.
  2. Create the forward record first. Add an A record (and AAAA if you use IPv6) for that name pointing to the sending IP.
  3. Request or set the PTR. Find out who owns the IP. On many cloud and VPS platforms there is a reverse DNS or hostname setting for each IP address in the control panel. Where there is not, open a support request with the IP and hostname. Interfaces and rules differ, so follow your provider's current documentation.
  4. Wait for propagation. Once set, lookups usually update within the record's TTL, though caches elsewhere can lag.
  5. Set the server's HELO name to match. Configure the mail server to announce the same hostname.
  6. Verify with dig and a test message. Check the Received headers of a delivered test for the expected name.

Aligning the HELO name in common MTAs

# Postfix: /etc/postfix/main.cf
myhostname = mail.example.com
smtp_helo_name = $myhostname

# Exim: main configuration
smtp_active_hostname = mail.example.com
# in the remote_smtp transport
helo_data = mail.example.com

Reload the service after the change. Note that some hosting environments set the system hostname at boot, so confirm that the change survives a restart. If you use a relay or a hosted sending service, the provider's IP addresses have their own PTR records and you do not manage them. Check this with your provider. Details on MTAs are in mail transfer agents.

One IP, many sending domains

A single server often sends for several domains. That is normal: the PTR and HELO name identify the machine, not each customer domain. Use one stable hostname for the IP and let SPF, DKIM and DMARC carry the identity of each sending domain. You do not need a separate PTR per domain, and you cannot have more than one useful PTR on an address anyway. What matters is that the visible From domain is authenticated and aligned, as explained in DMARC alignment. If you manage several brands, see sending subdomain strategy.

When you change the IP, retire a server or move to another provider, treat the PTR as part of the migration checklist. The new IP needs its own PTR, forward record and HELO name before any volume moves, and the old PTR should be removed when you release the address so it does not mislead whoever receives it next. Document the hostname-to-IP table in your runbook so that a rebuild does not silently revert to a generic provider name.

Mistakes to avoid

MistakeWhy it hurtsFix
Generic provider name left in placeLooks like a dynamic or shared hosting rangeRequest a custom hostname
PTR name does not resolve forwardFails FCRDNSAdd the matching A or AAAA record
PTR points to a hostname with a CNAMEResolvers and checks may fail or behave inconsistentlyPoint the A record straight at the IP
HELO says localhost or a bare nameRejected by many receiversUse the fully qualified PTR hostname
Several IPs, one shared nameNot every IP confirmsGive each IP its own name, or confirm all A records include each IP
Forgot the IPv6 addressMail over IPv6 fails reputation checksSet a PTR for IPv6 or send over IPv4 only
Changed IP without updating PTRNew IP has the old or no hostnameUpdate the PTR with every IP change

Troubleshooting

SymptomWhat to check
Bounce mentions no reverse DNS or PTRRun dig -x on the sending IP; request the record from the IP owner
Gmail or Microsoft rejects the connectionCheck FCRDNS, SPF, DKIM and DMARC together. See bulk sender requirements
Blocklist listing mentions generic rDNSFix the PTR first, then request delisting. See delisting guide
PTR changed but old value appearsWait for the TTL to expire, and query the authoritative server
Cannot find where to edit the PTRYou do not own the zone: ask the IP provider

You can look up whether a sending IP is listed on common blocklists with the blocklist check, and compare your identity records with the SPF, DKIM and DMARC checker.

When this matters and next steps

Reverse DNS matters whenever you send from IP addresses you control: a dedicated server, a VPS or a dedicated IP at a provider. If you send through a relay, the provider handles it for the relay IPs. Before you start sending volume from a new IP, set the PTR, align the HELO name, publish SPF, DKIM and DMARC and warm the address up. See dedicated versus shared IPs, warming up a new domain or IP and DNS records for email.

Skip the reverse DNS work Send through MigoSMTP on smtp.migosmtp.com and let the service manage sending IP identity while you authenticate your own domain.

Explore the SMTP relay

References and further reading

Frequently asked questions

What is a PTR record?

A PTR record maps an IP address to a hostname. It is the reverse of an A or AAAA record and is stored in the in-addr.arpa or ip6.arpa zones.

Why do mail servers check reverse DNS?

A missing or generic PTR often indicates a dynamic, compromised or poorly managed host, so many receivers penalise or reject such connections.

Who can set my PTR record?

The owner of the IP block, usually your hosting provider, cloud platform or ISP. It is not edited in your own domain zone.

What is forward-confirmed reverse DNS?

It means the PTR hostname of an IP resolves by A or AAAA back to the same IP address, confirming the two records agree.

How do I check my PTR record?

Run dig -x with your IP address, then look up the returned hostname and confirm it resolves to the same IP.

Topics#ptr record#reverse dns#fcrdns#sending ip#deliverability
Was this guide helpful?Your answer helps us improve our documentation.

Start sending in minutes.

Create an account, add your domain and send your first email.

Get started Talk to sales